summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-01 12:20:23 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-10-01 12:20:23 (GMT)
commitb73080b0c2c663c38c2d118aab1d9f990a4ea535 (patch)
treeff20d26ea5de81e1616dacf95e979a9897820481
parent541394f30a5cec3eb3745ec72ca2f11712439ac2 (diff)
parentd56f9237d7205cbc2db24fa5fbdc27000454291f (diff)
downloadCMake-b73080b0c2c663c38c2d118aab1d9f990a4ea535.zip
CMake-b73080b0c2c663c38c2d118aab1d9f990a4ea535.tar.gz
CMake-b73080b0c2c663c38c2d118aab1d9f990a4ea535.tar.bz2
Merge topic 'cmake-server-test-wait'
d56f9237 Tests: Teach Server test to wait for server exit
-rw-r--r--Tests/Server/server-test.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/Server/server-test.py b/Tests/Server/server-test.py
index 72f82ba..14767f4 100644
--- a/Tests/Server/server-test.py
+++ b/Tests/Server/server-test.py
@@ -102,4 +102,18 @@ for obj in testData:
print("Completed")
+# Tell the server to exit.
+proc.stdin.close()
+proc.stdout.close()
+
+# Wait for the server to exit.
+# If this version of python supports it, terminate the server after a timeout.
+try:
+ proc.wait(timeout=5)
+except TypeError:
+ proc.wait()
+except:
+ proc.terminate()
+ raise
+
sys.exit(0)