Signed-off-by: Peter Hutterer <[email protected]>
---
test/integration/input_drivers.cpp | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/test/integration/input_drivers.cpp
b/test/integration/input_drivers.cpp
index 5b3060b..bd0777f 100644
--- a/test/integration/input_drivers.cpp
+++ b/test/integration/input_drivers.cpp
@@ -10,9 +10,15 @@
*
*/
class InputDriverTest : public xorg::testing::Test {
+private:
+ xorg::testing::XServer server;
protected:
virtual void SetUp()
{
+ server.Start();
+ server.WaitForConnections();
+ xorg::testing::Test::SetDisplayString(server.GetDisplayString());
+
ASSERT_NO_FATAL_FAILURE(xorg::testing::Test::SetUp());
int event_start;
@@ -27,6 +33,13 @@ protected:
ASSERT_EQ(Success, XIQueryVersion(Display(), &major, &minor));
}
+ virtual void TearDown()
+ {
+ if (server.Pid() != -1)
+ if (!server.Terminate())
+ server.Kill();
+ }
+
int xi2_opcode_;
};
@@ -126,3 +139,9 @@ TEST_F(InputDriverTest, NewMaster)
XIFreeDeviceInfo(info);
}
+int main(int argc, char **argv) {
+
+ testing::InitGoogleTest(&argc, argv);
+
+ return RUN_ALL_TESTS();
+}
--
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