Fixes broken gtest_unittest on Cygwin and cleans it up (by Vlad Losev); fixes the wrong usage of os.environ.clear() in gtest_output_test.py (by Vlad Losev); fixes the logic for detecting Symbian (by Zhanyong Wan); moves TestProperty for event listener (by Vlad Losev).

This commit is contained in:
zhanyong.wan
2009-06-19 00:24:28 +00:00
parent 532dc2de35
commit ae3247986b
5 changed files with 56 additions and 57 deletions

View File

@@ -185,7 +185,11 @@ def IterShellCommandOutput(env_cmd, stdin_string=None):
old_env_vars = dict(os.environ)
os.environ.update(env_cmd[0])
stdin_file, stdout_file = os.popen2(env_cmd[1], 'b')
os.environ.clear()
# Changes made by os.environ.clear are not inheritable by child processes
# until Python 2.6. To produce inheritable changes we have to delete
# environment items with the del statement.
for key in os.environ.keys():
del os.environ[key]
os.environ.update(old_env_vars)
# If the caller didn't specify a string for STDIN, gets it from the