2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>

* 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.
This commit is contained in:
Emmanuele Bassi 2008-11-18 13:06:02 +00:00
parent 7a6353b971
commit ab9464b33d
2 changed files with 24 additions and 0 deletions

View File

@ -1,3 +1,13 @@
2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com>
* 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 <ebassi@linux.intel.com>
* tests/conform/test-mesh-contiguous.c:

View File

@ -1,3 +1,5 @@
#include "config.h"
#include <clutter/clutter.h>
#include <glib.h>
@ -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);