You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bb...@apache.org on 2018/12/13 12:59:47 UTC
[mesos] branch master updated: Fixed SIGINT handling in parallel
test runner.
This is an automated email from the ASF dual-hosted git repository.
bbannier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new 3ade731 Fixed SIGINT handling in parallel test runner.
3ade731 is described below
commit 3ade731d0c1772206c4afdf56318cfab6356acee
Author: Andrei Budnik <ab...@mesosphere.com>
AuthorDate: Thu Dec 13 13:57:50 2018 +0100
Fixed SIGINT handling in parallel test runner.
Previously, we were changing SIGINT signal handling by setting the
`SIG_IGN` flag in every worker from the worker pool. Hence, sending
SIGINT to `mesos-gtest-runner.py` led to leaks of `mesos-tests`
processes. This patch removes this handler to fix the issue.
This closes #321
---
support/mesos-gtest-runner.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/support/mesos-gtest-runner.py b/support/mesos-gtest-runner.py
index 94cc1a6..88a60c3 100755
--- a/support/mesos-gtest-runner.py
+++ b/support/mesos-gtest-runner.py
@@ -32,7 +32,6 @@ import multiprocessing
import os
import resource
import shlex
-import signal
import subprocess
import sys
@@ -73,8 +72,6 @@ def run_test(opts):
"""
shard, nshards, args = opts
- signal.signal(signal.SIGINT, signal.SIG_IGN)
-
env = os.environ.copy()
env['GTEST_TOTAL_SHARDS'] = str(nshards)
env['GTEST_SHARD_INDEX'] = str(shard)
@@ -88,6 +85,8 @@ def run_test(opts):
print(Bcolors.colorize('.', Bcolors.OKGREEN), end='')
sys.stdout.flush()
return True, output
+ except KeyboardInterrupt:
+ return False
except subprocess.CalledProcessError as error:
print(Bcolors.colorize('.', Bcolors.FAIL), end='')
sys.stdout.flush()