diff options
author | Stephen M. Webb <stephen.webb@canonical.com> | 2013-01-30 20:39:09 -0500 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-02-01 10:44:07 +1000 |
commit | 649f4f66efd5d8454478c4d45473cff0f75667e2 (patch) | |
tree | 34d9871506c522f920aecb9ce59662381380b184 | |
parent | 676b62af8cc28755e4b17b5b0d2d78f0704ebcfd (diff) |
fix 'make check' failure in a headless environment
The example tests suite failed to build in a headless environment because
that test suite relied on a default x.org installation. This patch does not
assume the build system has such a server and uses the dummy driver explicitly.
Signed-off-by: Stephen M. Webb <stephen.webb@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | examples/Makefile.am | 5 | ||||
-rw-r--r-- | examples/xorg-gtest-example.cpp | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/examples/Makefile.am b/examples/Makefile.am index b3ab863..2e86073 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -59,7 +59,10 @@ if ENABLE_XORG_GTEST_TESTS TESTS = $(noinst_PROGRAMS) endif xorg_gtest_example_SOURCES = xorg-gtest-example.cpp -xorg_gtest_example_CPPFLAGS = -I$(top_srcdir)/include $(AM_CPPFLAGS) +xorg_gtest_example_CPPFLAGS = \ + -I$(top_srcdir)/include \ + $(AM_CPPFLAGS) \ + -DDUMMY_CONF_PATH="\"$(abs_top_srcdir)/data/xorg/gtest/dummy.conf\"" xorg_gtest_example_LDADD = \ libgtest.a \ libxorg-gtest.a \ diff --git a/examples/xorg-gtest-example.cpp b/examples/xorg-gtest-example.cpp index 00481fc..fa09e7f 100644 --- a/examples/xorg-gtest-example.cpp +++ b/examples/xorg-gtest-example.cpp @@ -24,6 +24,7 @@ using namespace xorg::testing; TEST(XServer, StartServer) { XServer server; server.SetOption("-logfile", LOGFILE_DIR "/xserver-startserver.log"); + server.SetOption("-config", DUMMY_CONF_PATH); server.Start(); ASSERT_EQ(server.GetState(), Process::RUNNING); @@ -40,6 +41,7 @@ TEST(XServer, StartServer) { TEST(XServer, DisplayConnection) { XServer server; server.SetOption("-logfile", LOGFILE_DIR "/xserver-display-connection.log"); + server.SetOption("-config", DUMMY_CONF_PATH); server.Start(); Display *dpy = XOpenDisplay(server.GetDisplayString().c_str()); @@ -69,6 +71,7 @@ public: log << ".log"; server.SetOption("-logfile", log.str()); + server.SetOption("-config", DUMMY_CONF_PATH); server.Start(); /* set up Display() */ |