thrift/test/py/RunClientServer.py
David Reiss 9ff3b9d5fc Thrift: Python test improvements.
Summary:
- Add a serialization test for forwards/backwards compatibility.
- Hook the Python tests up to "make check".
- Miscellaneous changes to the Python tests.

Reviewed By: mcslee

Test Plan: Ran the test.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665480 13f79535-47bb-0310-9956-ffa450edef68
2008-02-15 01:10:23 +00:00

17 lines
373 B
Python
Executable File

#!/usr/bin/env python
import subprocess
import sys
import os
import signal
serverproc = subprocess.Popen([sys.executable, "TestServer.py"])
try:
ret = subprocess.call([sys.executable, "TestClient.py"])
if ret != 0:
raise Exception("subprocess failed")
finally:
# fixme: should check that server didn't die
os.kill(serverproc.pid, signal.SIGKILL)