diff options
author | Brad King <brad.king@kitware.com> | 2016-10-01 12:20:23 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-10-01 12:20:23 (GMT) |
commit | b73080b0c2c663c38c2d118aab1d9f990a4ea535 (patch) | |
tree | ff20d26ea5de81e1616dacf95e979a9897820481 | |
parent | 541394f30a5cec3eb3745ec72ca2f11712439ac2 (diff) | |
parent | d56f9237d7205cbc2db24fa5fbdc27000454291f (diff) | |
download | CMake-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.py | 14 |
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) |