diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-04-09 02:57:38 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-04-09 02:57:38 +0000 |
commit | 7fa242a44b47ce74d7246440b14571f7a5dd1b17 (patch) | |
tree | 968a9d50b23d7ef33cf37aaed77d23f0407fde7d /test/gtest_env_var_test.py | |
parent | c12f63214e9b7761d27e68353e4aaf1761c9cf88 (diff) | |
download | googletest-7fa242a44b47ce74d7246440b14571f7a5dd1b17.tar.gz googletest-7fa242a44b47ce74d7246440b14571f7a5dd1b17.tar.bz2 googletest-7fa242a44b47ce74d7246440b14571f7a5dd1b17.zip |
Makes the Python tests more stable (by Vlad Losev); fixes a memory leak in GetThreadCount() on Mac (by Vlad Losev); improves fuse_gtest_files.py to support fusing Google Mock files (by Zhanyong Wan).
Diffstat (limited to 'test/gtest_env_var_test.py')
-rwxr-xr-x | test/gtest_env_var_test.py | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/test/gtest_env_var_test.py b/test/gtest_env_var_test.py index c5acc5ca..92b9cd8a 100755 --- a/test/gtest_env_var_test.py +++ b/test/gtest_env_var_test.py @@ -41,18 +41,7 @@ import unittest IS_WINDOWS = os.name == 'nt' IS_LINUX = os.name == 'posix' -if IS_WINDOWS: - BUILD_DIRS = [ - 'build.dbg\\', - 'build.opt\\', - 'build.dbg8\\', - 'build.opt8\\', - ] - COMMAND = 'gtest_env_var_test_.exe' - -if IS_LINUX: - COMMAND = os.path.join(gtest_test_utils.GetBuildDir(), - 'gtest_env_var_test_') +COMMAND = gtest_test_utils.GetTestExecutablePath('gtest_env_var_test_') def AssertEq(expected, actual): @@ -104,34 +93,19 @@ def TestEnvVarAffectsFlag(command): TestFlag(command, 'print_time', '1', '0') TestFlag(command, 'repeat', '999', '1') TestFlag(command, 'throw_on_failure', '1', '0') + TestFlag(command, 'death_test_style', 'threadsafe', 'fast') if IS_WINDOWS: TestFlag(command, 'catch_exceptions', '1', '0') if IS_LINUX: TestFlag(command, 'stack_trace_depth', '0', '100') - TestFlag(command, 'death_test_style', 'thread-safe', 'fast') TestFlag(command, 'death_test_use_fork', '1', '0') -if IS_WINDOWS: - - def main(): - for build_dir in BUILD_DIRS: - command = build_dir + COMMAND - print 'Testing with %s . . .' % (command,) - TestEnvVarAffectsFlag(command) - return 0 - - if __name__ == '__main__': - main() - - -if IS_LINUX: - - class GTestEnvVarTest(unittest.TestCase): - def testEnvVarAffectsFlag(self): - TestEnvVarAffectsFlag(COMMAND) +class GTestEnvVarTest(unittest.TestCase): + def testEnvVarAffectsFlag(self): + TestEnvVarAffectsFlag(COMMAND) - if __name__ == '__main__': - gtest_test_utils.Main() +if __name__ == '__main__': + gtest_test_utils.Main() |