aboutsummaryrefslogtreecommitdiffstats
path: root/test/gtest_break_on_failure_unittest.py
diff options
context:
space:
mode:
authorshiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925>2008-09-18 21:18:11 +0000
committershiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925>2008-09-18 21:18:11 +0000
commite79c3ccb73d68543e8ad98d69179dee74abff7ab (patch)
tree3754cd4cd0ddc726c95c456944e7235826a34e3e /test/gtest_break_on_failure_unittest.py
parentf6b0dc0b408f38bb04079b14198d6bdf703e5e56 (diff)
downloadgoogletest-e79c3ccb73d68543e8ad98d69179dee74abff7ab.tar.gz
googletest-e79c3ccb73d68543e8ad98d69179dee74abff7ab.tar.bz2
googletest-e79c3ccb73d68543e8ad98d69179dee74abff7ab.zip
Makes the Python tests more portable by calling standard functions to interpret the result of os.system(). This could fix the broken Python tests on some users' machines.
Diffstat (limited to 'test/gtest_break_on_failure_unittest.py')
-rwxr-xr-xtest/gtest_break_on_failure_unittest.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/gtest_break_on_failure_unittest.py b/test/gtest_break_on_failure_unittest.py
index 674ef11d..88716c9c 100755
--- a/test/gtest_break_on_failure_unittest.py
+++ b/test/gtest_break_on_failure_unittest.py
@@ -78,10 +78,7 @@ def Run(command):
"""
exit_code = os.system(command)
- # On Unix-like systems, the lowest 8 bits of the exit code is the
- # signal number that killed the process (or 0 if it wasn't killed by
- # a signal).
- return (exit_code & 255) != 0
+ return os.WIFSIGNALED(exit_code)
# The unit test.