This repository has been archived by the owner. It is now read-only.
Browse files

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
  • Loading branch information...
indutny committed Feb 20, 2012
1 parent de5e3f6 commit 0cebfc8ddb509fbf5f865bb660b73e96680b3f65
Showing with 7 additions and 1 deletion.
  1. +7 −1 tools/
@@ -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.