Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
indutny committed Feb 20, 2012
1 parent de5e3f6 commit 0cebfc8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/test.py
Expand Up @@ -1437,4 +1437,10 @@ def DoSkip(case):


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)

0 comments on commit 0cebfc8

Please sign in to comment.