Bug 709878 - test-session-* skipped when xvfb-run is unavailable.

Also add a GIMP_EXIT_TEST_SKIPPED #define, to return the SKIP exit value
documented by automake.
This commit is contained in:
Jehan
2013-10-11 20:36:26 +13:00
parent f3d40dceec
commit 6ee77e5635
5 changed files with 45 additions and 0 deletions

View File

@ -31,6 +31,9 @@
g_test_add_func ("/gimp-session-2-8-compatibility-single-window/" #function, \
function);
#define SKIP_TEST(function) \
g_test_add_func ("/gimp-session-2-8-compatibility-single-window/subprocess/" #function, \
function);
/**
* Tests that a multi-window sessionrc in GIMP 2.8 format is loaded
@ -51,8 +54,16 @@ int main(int argc, char **argv)
gimp_test_bail_if_no_display ();
gtk_test_init (&argc, &argv, NULL);
#ifdef HAVE_XVFB_RUN
ADD_TEST (read_and_write_session_files);
#else
SKIP_TEST (read_and_write_session_files);
#endif
/* Don't bother freeing stuff, the process is short-lived */
#ifdef HAVE_XVFB_RUN
return g_test_run ();
#else
return GIMP_EXIT_TEST_SKIPPED;
#endif
}