Commit 649f4f66 authored by Stephen M. Webb's avatar Stephen M. Webb Committed by Peter Hutterer
Browse files

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: default avatarStephen M. Webb <stephen.webb@canonical.com>
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 676b62af
......@@ -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 \
......
......@@ -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() */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment