Every so-often, the server doesn't terminate fast enough and we fail the
test. Put a wait loop in.

Signed-off-by: Peter Hutterer <[email protected]>
---
 test/xserver-test.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/xserver-test.cpp b/test/xserver-test.cpp
index 7f949ef..822bb23 100644
--- a/test/xserver-test.cpp
+++ b/test/xserver-test.cpp
@@ -358,10 +358,15 @@ TEST(XServer, KeepAlive)
 
 TEST(XServer, RemoveOption)
 {
+  int i = 0;
   XServer server;
   server.SetOption("-fail", "yes");
   server.SetOption("-logfile", LOGFILE_DIR "/Xorg-remove-option.log");
   server.Start(TEST_ROOT_DIR "/xserver-test-helper");
+
+  while(i++ < 10 && server.GetState() == Process::RUNNING)
+    usleep(50000);
+
   ASSERT_EQ(server.GetState(), Process::FINISHED_FAILURE);
 
   server.RemoveOption("-fail");
-- 
1.8.0.2

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to