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).

This commit is contained in:
zhanyong.wan
2009-04-09 02:57:38 +00:00
parent c12f63214e
commit 7fa242a44b
15 changed files with 254 additions and 197 deletions

View File

@@ -121,10 +121,9 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase):
default name if no name is explicitly specified.
"""
temp_dir = tempfile.mkdtemp()
output_file = os.path.join(temp_dir,
GTEST_DEFAULT_OUTPUT_FILE)
gtest_prog_path = os.path.join(gtest_test_utils.GetBuildDir(),
"gtest_no_test_unittest")
output_file = os.path.join(temp_dir, GTEST_DEFAULT_OUTPUT_FILE)
gtest_prog_path = gtest_test_utils.GetTestExecutablePath(
"gtest_no_test_unittest")
try:
os.remove(output_file)
except OSError, e:
@@ -148,8 +147,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase):
"""
xml_path = os.path.join(tempfile.mkdtemp(), gtest_prog_name + "out.xml")
gtest_prog_path = os.path.join(gtest_test_utils.GetBuildDir(),
gtest_prog_name)
gtest_prog_path = gtest_test_utils.GetTestExecutablePath(gtest_prog_name)
command = [gtest_prog_path, "%s=xml:%s" % (GTEST_OUTPUT_FLAG, xml_path)]
p = gtest_test_utils.Subprocess(command)