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.
This commit is contained in:
parent
de5e3f6a6f
commit
0cebfc8ddb
@ -1437,4 +1437,10 @@ def 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…
x
Reference in New Issue
Block a user