Google Test's Python tests now pass on Solaris.

This commit is contained in:
vladlosev
2010-02-15 21:31:41 +00:00
parent 9d965bbeef
commit 6f50ccf32c
6 changed files with 133 additions and 59 deletions

View File

@@ -42,6 +42,8 @@ IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_env_var_test_')
environ = os.environ.copy()
def AssertEq(expected, actual):
if expected != actual:
@@ -54,9 +56,9 @@ def SetEnvVar(env_var, value):
"""Sets the env variable to 'value'; unsets it when '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 GetFlag(flag):
@@ -65,7 +67,7 @@ def GetFlag(flag):
args = [COMMAND]
if flag is not None:
args += [flag]
return gtest_test_utils.Subprocess(args).output
return gtest_test_utils.Subprocess(args, env=environ).output
def TestFlag(flag, test_val, default_val):