summaryrefslogtreecommitdiff
path: root/test/gtest_xml_output_unittest.py
diff options
context:
space:
mode:
authorvladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2008-11-26 20:02:45 +0000
committervladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925>2008-11-26 20:02:45 +0000
commit365a150aeb599922be07d5f62939d0be04f1f19f (patch)
tree16c1ac5e4b98ea73315c0de0b2a8b72ffdd5a722 /test/gtest_xml_output_unittest.py
parentfe6a9a48c2a8280439e58c2e9020268a80df89b3 (diff)
downloadgtest-365a150aeb599922be07d5f62939d0be04f1f19f.tar.gz
gtest-365a150aeb599922be07d5f62939d0be04f1f19f.tar.bz2
gtest-365a150aeb599922be07d5f62939d0be04f1f19f.tar.xz
Fixed gtest_break_on_failure_unittest on Ubuntu 8.04 and Windows
git-svn-id: http://googletest.googlecode.com/svn/trunk@137 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'test/gtest_xml_output_unittest.py')
-rwxr-xr-xtest/gtest_xml_output_unittest.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/gtest_xml_output_unittest.py b/test/gtest_xml_output_unittest.py
index c5f9f57..5e0b220 100755
--- a/test/gtest_xml_output_unittest.py
+++ b/test/gtest_xml_output_unittest.py
@@ -131,10 +131,11 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase):
if e.errno != errno.ENOENT:
raise
- status = gtest_test_utils.RunCommandSuppressOutput(
- "%s %s=xml" % (gtest_prog_path, GTEST_OUTPUT_FLAG),
- working_dir=temp_dir)
- self.assertEquals(0, gtest_test_utils.GetExitStatus(status))
+ p = gtest_test_utils.Subprocess(
+ [gtest_prog_path, "%s=xml" % GTEST_OUTPUT_FLAG],
+ working_dir=temp_dir)
+ self.assert_(p.exited)
+ self.assertEquals(0, p.exit_code)
self.assert_(os.path.isfile(output_file))
@@ -150,18 +151,17 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase):
gtest_prog_path = os.path.join(gtest_test_utils.GetBuildDir(),
gtest_prog_name)
- command = ("%s %s=xml:%s" % (gtest_prog_path, GTEST_OUTPUT_FLAG, xml_path))
- status = gtest_test_utils.RunCommandSuppressOutput(command)
- if os.WIFSIGNALED(status):
- signal = os.WTERMSIG(status)
+ command = [gtest_prog_path, "%s=xml:%s" % (GTEST_OUTPUT_FLAG, xml_path)]
+ p = gtest_test_utils.Subprocess(command)
+ if p.terminated_by_signal:
self.assert_(False,
- "%s was killed by signal %d" % (gtest_prog_name, signal))
+ "%s was killed by signal %d" % (gtest_prog_name, p.signal))
else:
- exit_code = gtest_test_utils.GetExitStatus(status)
- self.assertEquals(expected_exit_code, exit_code,
+ self.assert_(p.exited)
+ self.assertEquals(expected_exit_code, p.exit_code,
"'%s' exited with code %s, which doesn't match "
"the expected exit code %s."
- % (command, exit_code, expected_exit_code))
+ % (command, p.exit_code, expected_exit_code))
expected = minidom.parseString(expected_xml)
actual = minidom.parse(xml_path)