Browse Source

tests: kill process group on failure

Test suite is often leaving `stray` processes on failure. They are
harmless, but may cause future test runs fail because those `stray`
processes are occupying `common.PORT` or due to some other reasons.

Killing whole process group on test suite failure should help in such
cases.
v0.9.1-release
Fedor Indutny 13 years ago
parent
commit
0cebfc8ddb
  1. 8
      tools/test.py

8
tools/test.py

@ -1437,4 +1437,10 @@ def Main():
if __name__ == '__main__': if __name__ == '__main__':
sys.exit(Main()) ret = 0
try:
ret = Main()
sys.exit(ret)
finally:
if ret and not utils.IsWindows():
os.killpg(0, signal.SIGKILL)

Loading…
Cancel
Save