asfgit closed pull request #321: Fixed SIGINT handling in parallel test runner.
URL: https://github.com/apache/mesos/pull/321
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/support/mesos-gtest-runner.py b/support/mesos-gtest-runner.py
index 94cc1a64ec..88a60c39e3 100755
--- a/support/mesos-gtest-runner.py
+++ b/support/mesos-gtest-runner.py
@@ -32,7 +32,6 @@
 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()


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to