[gimp] app: fix some stuff in tests, down to 3 failing
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix some stuff in tests, down to 3 failing
- Date: Mon, 28 May 2018 22:47:02 +0000 (UTC)
commit e237d431de17bdef253626e7f910860faf63b4bd
Author: Michael Natterer <mitch gimp org>
Date: Tue May 29 00:44:51 2018 +0200
app: fix some stuff in tests, down to 3 failing
- set GIMP3_DIRECTORY env variable not GIMP2_DIRECTORY
- make sure the cursors resource gets compiled in
- remove tab autosizing test, that code is gone
app/tests/Makefile.am | 1 +
app/tests/gimp-app-test-utils.c | 8 ++--
app/tests/gimp-app-test-utils.h | 2 +-
app/tests/gimp-test-session-utils.c | 4 +-
app/tests/gimpdir/sessionrc | 2 +-
app/tests/gimpdir/sessionrc-2-8-multi-window | 2 +-
app/tests/gimpdir/sessionrc-expected | 2 +-
app/tests/gimpdir/sessionrc-expected-multi-window | 2 +-
app/tests/test-core.c | 4 +-
app/tests/test-save-and-export.c | 4 +-
app/tests/test-single-window-mode.c | 4 +-
app/tests/test-tools.c | 4 +-
app/tests/test-ui.c | 57 +----------------------
app/tests/test-xcf.c | 4 +-
14 files changed, 24 insertions(+), 76 deletions(-)
---
diff --git a/app/tests/Makefile.am b/app/tests/Makefile.am
index be40e1d3d1..b9be39c800 100644
--- a/app/tests/Makefile.am
+++ b/app/tests/Makefile.am
@@ -75,6 +75,7 @@ AM_LDFLAGS = \
-Wl,-u,$(SYMPREFIX)gimp_pdb_compat_param_spec \
-Wl,-u,$(SYMPREFIX)gimp_layer_mode_is_legacy \
-Wl,-u,$(SYMPREFIX)gui_init \
+ -Wl,-u,$(SYMPREFIX)gimp_tool_cursors_get_resource \
-Wl,-u,$(SYMPREFIX)gimp_lebl_dialog
# Note that we have some duplicate entries here too to work around
diff --git a/app/tests/gimp-app-test-utils.c b/app/tests/gimp-app-test-utils.c
index 989b7b7806..b055ad8dea 100644
--- a/app/tests/gimp-app-test-utils.c
+++ b/app/tests/gimp-app-test-utils.c
@@ -77,21 +77,21 @@ gimp_test_utils_set_env_to_subpath (const gchar *root_env_var,
/**
- * gimp_test_utils_set_gimp2_directory:
+ * gimp_test_utils_set_gimp3_directory:
* @root_env_var: Either "GIMP_TESTING_ABS_TOP_SRCDIR" or
* "GIMP_TESTING_ABS_TOP_BUILDDIR"
* @subdir: Subdir, may be %NULL
*
- * Sets GIMP2_DIRECTORY to the source dir @root_env_var/@subdir. The
+ * Sets GIMP3_DIRECTORY to the source dir @root_env_var/@subdir. The
* environment variables is set up by the test runner, see Makefile.am
**/
void
-gimp_test_utils_set_gimp2_directory (const gchar *root_env_var,
+gimp_test_utils_set_gimp3_directory (const gchar *root_env_var,
const gchar *subdir)
{
gimp_test_utils_set_env_to_subpath (root_env_var,
subdir,
- "GIMP2_DIRECTORY" /*target_env_var*/);
+ "GIMP3_DIRECTORY" /*target_env_var*/);
}
/**
diff --git a/app/tests/gimp-app-test-utils.h b/app/tests/gimp-app-test-utils.h
index 9cb22287fe..c022e36b6e 100644
--- a/app/tests/gimp-app-test-utils.h
+++ b/app/tests/gimp-app-test-utils.h
@@ -22,7 +22,7 @@
void gimp_test_utils_set_env_to_subpath (const gchar *root_env_var,
const gchar *subdir,
const gchar *target_env_var);
-void gimp_test_utils_set_gimp2_directory (const gchar *root_env_var,
+void gimp_test_utils_set_gimp3_directory (const gchar *root_env_var,
const gchar *subdir);
void gimp_test_utils_setup_menus_dir (void);
void gimp_test_utils_create_image (Gimp *gimp,
diff --git a/app/tests/gimp-test-session-utils.c b/app/tests/gimp-test-session-utils.c
index dd35b9038b..c6517056f6 100644
--- a/app/tests/gimp-test-session-utils.c
+++ b/app/tests/gimp-test-session-utils.c
@@ -175,7 +175,7 @@ gimp_test_session_load_and_write_session_files (const gchar *loaded_sessionrc,
gchar *dockrc_filename = NULL;
/* Make sure to run this before we use any GIMP functions */
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
"app/tests/gimpdir");
gimp_test_utils_setup_menus_dir ();
@@ -209,7 +209,7 @@ gimp_test_session_load_and_write_session_files (const gchar *loaded_sessionrc,
* dir. There is a hook in Makefile.am that makes sure the output
* dir exists
*/
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
"app/tests/gimpdir-output");
/* Use normal output names */
g_unsetenv ("GIMP_TESTING_SESSIONRC_NAME");
diff --git a/app/tests/gimpdir/sessionrc b/app/tests/gimpdir/sessionrc
index e23b5e9ff7..ff8fc752bf 100644
--- a/app/tests/gimpdir/sessionrc
+++ b/app/tests/gimpdir/sessionrc
@@ -82,7 +82,7 @@
(book
(current-page 0)
(dockable "gimp-channel-list"
- (tab-style automatic)
+ (tab-style icon)
(preview-size 32)
(aux-info
(show-button-bar "true"))))
diff --git a/app/tests/gimpdir/sessionrc-2-8-multi-window b/app/tests/gimpdir/sessionrc-2-8-multi-window
index 4afc5bf1d6..5617d791dc 100644
--- a/app/tests/gimpdir/sessionrc-2-8-multi-window
+++ b/app/tests/gimpdir/sessionrc-2-8-multi-window
@@ -70,7 +70,7 @@
(book
(current-page 0)
(dockable "gimp-channel-list"
- (tab-style automatic)
+ (tab-style icon)
(preview-size 32)))
(book
(position 200)
diff --git a/app/tests/gimpdir/sessionrc-expected b/app/tests/gimpdir/sessionrc-expected
index 4afc5bf1d6..5617d791dc 100644
--- a/app/tests/gimpdir/sessionrc-expected
+++ b/app/tests/gimpdir/sessionrc-expected
@@ -70,7 +70,7 @@
(book
(current-page 0)
(dockable "gimp-channel-list"
- (tab-style automatic)
+ (tab-style icon)
(preview-size 32)))
(book
(position 200)
diff --git a/app/tests/gimpdir/sessionrc-expected-multi-window
b/app/tests/gimpdir/sessionrc-expected-multi-window
index 866446be60..ddd2e69267 100644
--- a/app/tests/gimpdir/sessionrc-expected-multi-window
+++ b/app/tests/gimpdir/sessionrc-expected-multi-window
@@ -82,7 +82,7 @@
(book
(current-page 0)
(dockable "gimp-channel-list"
- (tab-style automatic)
+ (tab-style icon)
(preview-size 32)
(aux-info
(show-button-bar "true"))))
diff --git a/app/tests/test-core.c b/app/tests/test-core.c
index cf27bc185a..a914da6a85 100644
--- a/app/tests/test-core.c
+++ b/app/tests/test-core.c
@@ -267,7 +267,7 @@ main (int argc,
g_test_init (&argc, &argv, NULL);
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
"app/tests/gimpdir");
/* We share the same application instance across all tests */
@@ -283,7 +283,7 @@ main (int argc,
result = g_test_run ();
/* Don't write files to the source dir */
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
"app/tests/gimpdir-output");
/* Exit so we don't break script-fu plug-in wire */
diff --git a/app/tests/test-save-and-export.c b/app/tests/test-save-and-export.c
index da47a906ad..9f6f9f758e 100644
--- a/app/tests/test-save-and-export.c
+++ b/app/tests/test-save-and-export.c
@@ -366,7 +366,7 @@ main(int argc,
gimp_test_bail_if_no_display ();
gtk_test_init (&argc, &argv, NULL);
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
"app/tests/gimpdir");
gimp_test_utils_setup_menus_dir ();
@@ -385,7 +385,7 @@ main(int argc,
result = g_test_run ();
/* Don't write files to the source dir */
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
"app/tests/gimpdir-output");
/* Exit properly so we don't break script-fu plug-in wire */
diff --git a/app/tests/test-single-window-mode.c b/app/tests/test-single-window-mode.c
index b97c532e11..40ec4893fe 100644
--- a/app/tests/test-single-window-mode.c
+++ b/app/tests/test-single-window-mode.c
@@ -133,7 +133,7 @@ int main(int argc, char **argv)
gimp_test_bail_if_no_display ();
gtk_test_init (&argc, &argv, NULL);
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
"app/tests/gimpdir");
gimp_test_utils_setup_menus_dir ();
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
result = g_test_run ();
/* Don't write files to the source dir */
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
"app/tests/gimpdir-output");
/* Exit properly so we don't break script-fu plug-in wire */
diff --git a/app/tests/test-tools.c b/app/tests/test-tools.c
index b01a6f9c44..89b9c4c08a 100644
--- a/app/tests/test-tools.c
+++ b/app/tests/test-tools.c
@@ -474,7 +474,7 @@ int main(int argc, char **argv)
gimp_test_bail_if_no_display ();
gtk_test_init (&argc, &argv, NULL);
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
"app/tests/gimpdir");
gimp_test_utils_setup_menus_dir ();
@@ -490,7 +490,7 @@ int main(int argc, char **argv)
result = g_test_run ();
/* Don't write files to the source dir */
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
"app/tests/gimpdir-output");
/* Exit properly so we don't break script-fu plug-in wire */
diff --git a/app/tests/test-ui.c b/app/tests/test-ui.c
index ea5f3e8836..27a20545c3 100644
--- a/app/tests/test-ui.c
+++ b/app/tests/test-ui.c
@@ -168,58 +168,6 @@ gimp_ui_get_dialog (const gchar *identifier)
return result;
}
-static void
-automatic_tab_style (gconstpointer data)
-{
- GtkWidget *channel_dockable = gimp_ui_get_dialog ("gimp-channel-list");
- GimpDockable *dockable;
- GimpUIManager *ui_manager;
- g_assert (channel_dockable != NULL);
-
- dockable = GIMP_DOCKABLE (channel_dockable);
-
- gimp_test_run_mainloop_until_idle ();
-
- /* The channel dockable is the only dockable, it has enough space
- * for the icon-blurb
- */
- g_assert_cmpint (GIMP_TAB_STYLE_ICON_BLURB,
- ==,
- gimp_dockable_get_tab_style (dockable));
-
- /* Add some dockables to the channel dockable dockbook */
- ui_manager =
- gimp_dockbook_get_ui_manager (gimp_dockable_get_dockbook (dockable));
- gimp_ui_manager_activate_action (ui_manager,
- "dockable",
- "dialogs-sample-points");
- gimp_ui_manager_activate_action (ui_manager,
- "dockable",
- "dialogs-vectors");
- gimp_test_run_mainloop_until_idle ();
-
- /* Now there is not enough space to have icon-blurb for channel
- * dockable, make sure it's just an icon now
- */
- g_assert_cmpint (GIMP_TAB_STYLE_ICON,
- ==,
- gimp_dockable_get_tab_style (dockable));
-
- /* Close the two dockables we added */
- gimp_ui_manager_activate_action (ui_manager,
- "dockable",
- "dockable-close-tab");
- gimp_ui_manager_activate_action (ui_manager,
- "dockable",
- "dockable-close-tab");
- gimp_test_run_mainloop_until_idle ();
-
- /* We should now be back on icon-blurb */
- g_assert_cmpint (GIMP_TAB_STYLE_ICON_BLURB,
- ==,
- gimp_dockable_get_tab_style (dockable));
-}
-
static void
create_new_image_via_dialog (gconstpointer data)
{
@@ -931,7 +879,7 @@ int main(int argc, char **argv)
gimp_test_bail_if_no_display ();
gtk_test_init (&argc, &argv, NULL);
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
"app/tests/gimpdir");
gimp_test_utils_setup_menus_dir ();
@@ -945,7 +893,6 @@ int main(int argc, char **argv)
*/
ADD_TEST (paintbrush_is_standard_tool);
ADD_TEST (tool_options_editor_updates);
- ADD_TEST (automatic_tab_style);
ADD_TEST (create_new_image_via_dialog);
ADD_TEST (keyboard_zoom_focus);
ADD_TEST (alt_click_is_layer_to_selection);
@@ -970,7 +917,7 @@ int main(int argc, char **argv)
result = g_test_run ();
/* Don't write files to the source dir */
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
"app/tests/gimpdir-output");
/* Exit properly so we don't break script-fu plug-in wire */
diff --git a/app/tests/test-xcf.c b/app/tests/test-xcf.c
index 1c6054ecb9..9fc2ec1f4b 100644
--- a/app/tests/test-xcf.c
+++ b/app/tests/test-xcf.c
@@ -988,7 +988,7 @@ main (int argc,
g_test_init (&argc, &argv, NULL);
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
"app/tests/gimpdir");
/* We share the same application instance across all tests. We need
@@ -1003,7 +1003,7 @@ main (int argc,
ADD_TEST (write_and_read_gimp_2_8_format);
/* Don't write files to the source dir */
- gimp_test_utils_set_gimp2_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
+ gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_BUILDDIR",
"app/tests/gimpdir-output");
/* Run the tests */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]