From: "Stephen M. Webb" <[email protected]> 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 <[email protected]> --- examples/Makefile.am | 5 ++++- examples/xorg-gtest-example.cpp | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) 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() */ -- 1.7.10.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
