diff --git a/ChangeLog b/ChangeLog index 648bfdc90..75936be09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-11-18 Emmanuele Bassi + + * tests/conform/test-conform-main.c (main): Do not run the + conformance test suite if we are on X11 but we do not have + a DISPLAY available. Some of the tests require a DISPLAY, + and everything passes through a clutter_init() call which will + fail anyway. If we are running make distcheck on an headless + box we might as well just skip the conformance test suite + without a meaningless error. + 2008-11-18 Emmanuele Bassi * tests/conform/test-mesh-contiguous.c: diff --git a/tests/conform/test-conform-main.c b/tests/conform/test-conform-main.c index 19e7d6525..b70ab1caf 100644 --- a/tests/conform/test-conform-main.c +++ b/tests/conform/test-conform-main.c @@ -1,3 +1,5 @@ +#include "config.h" + #include #include @@ -30,6 +32,18 @@ int main (int argc, char **argv) { TestConformSharedState *shared_state = g_new0 (TestConformSharedState, 1); + const gchar *display; + +#ifdef HAVE_CLUTTER_GLX + /* on X11 we need a display connection to run the test suite */ + display = g_getenv ("DISPLAY"); + if (!display || *display == '\0') + { + g_print ("No DISPLAY found. Unable to run the conformance " + "test suite without a display."); + return EXIT_SUCCESS; + } +#endif g_test_init (&argc, &argv, NULL);