aboutsummaryrefslogtreecommitdiffstats
path: root/test/gtest_break_on_failure_unittest.py
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-02-15 21:31:41 +0000
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2010-02-15 21:31:41 +0000
commit6f50ccf32c31cb6e287cdfee149429ac3029bbdb (patch)
tree9324bea98a767ee2eca3f4d738aa1c0f80b9033e /test/gtest_break_on_failure_unittest.py
parent9d965bbeefdd8e309e23145b1b475a0961e108a7 (diff)
downloadgoogletest-6f50ccf32c31cb6e287cdfee149429ac3029bbdb.tar.gz
googletest-6f50ccf32c31cb6e287cdfee149429ac3029bbdb.tar.bz2
googletest-6f50ccf32c31cb6e287cdfee149429ac3029bbdb.zip
Google Test's Python tests now pass on Solaris.
Diffstat (limited to 'test/gtest_break_on_failure_unittest.py')
-rwxr-xr-xtest/gtest_break_on_failure_unittest.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/gtest_break_on_failure_unittest.py b/test/gtest_break_on_failure_unittest.py
index 218d3713..c8191833 100755
--- a/test/gtest_break_on_failure_unittest.py
+++ b/test/gtest_break_on_failure_unittest.py
@@ -69,21 +69,24 @@ EXE_PATH = gtest_test_utils.GetTestExecutablePath(
# Utilities.
+environ = os.environ.copy()
+
+
def SetEnvVar(env_var, value):
"""Sets an environment variable to a given value; unsets it when the
given value is None.
"""
if value is not None:
- os.environ[env_var] = value
- elif env_var in os.environ:
- del os.environ[env_var]
+ environ[env_var] = value
+ elif env_var in environ:
+ del environ[env_var]
def Run(command):
"""Runs a command; returns 1 if it was killed by a signal, or 0 otherwise."""
- p = gtest_test_utils.Subprocess(command)
+ p = gtest_test_utils.Subprocess(command, env=environ)
if p.terminated_by_signal:
return 1
else: