diff options
Diffstat (limited to 'gtests/google_test/gtest/test/gtest_xml_test_utils.py')
-rwxr-xr-x | gtests/google_test/gtest/test/gtest_xml_test_utils.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gtests/google_test/gtest/test/gtest_xml_test_utils.py b/gtests/google_test/gtest/test/gtest_xml_test_utils.py index 9914a49ec..ec42c62c3 100755 --- a/gtests/google_test/gtest/test/gtest_xml_test_utils.py +++ b/gtests/google_test/gtest/test/gtest_xml_test_utils.py @@ -70,7 +70,7 @@ class GTestXMLTestCase(gtest_test_utils.TestCase): self.assertEquals(expected_node.tagName, actual_node.tagName) expected_attributes = expected_node.attributes - actual_attributes = actual_node .attributes + actual_attributes = actual_node.attributes self.assertEquals( expected_attributes.length, actual_attributes.length, 'attribute numbers differ in element %s:\nExpected: %r\nActual: %r' % ( @@ -78,7 +78,7 @@ class GTestXMLTestCase(gtest_test_utils.TestCase): actual_attributes.keys())) for i in range(expected_attributes.length): expected_attr = expected_attributes.item(i) - actual_attr = actual_attributes.get(expected_attr.name) + actual_attr = actual_attributes.get(expected_attr.name) self.assert_( actual_attr is not None, 'expected attribute %s not found in element %s' % @@ -105,6 +105,7 @@ class GTestXMLTestCase(gtest_test_utils.TestCase): 'testsuite': 'name', 'testcase': 'name', 'failure': 'message', + 'skipped': 'message', 'property': 'name', } @@ -171,7 +172,7 @@ class GTestXMLTestCase(gtest_test_utils.TestCase): if element.tagName in ('testsuites', 'testsuite', 'testcase'): timestamp = element.getAttributeNode('timestamp') - timestamp.value = re.sub(r'^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d$', + timestamp.value = re.sub(r'^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\d$', '*', timestamp.value) if element.tagName in ('testsuites', 'testsuite', 'testcase'): time = element.getAttributeNode('time') @@ -179,7 +180,7 @@ class GTestXMLTestCase(gtest_test_utils.TestCase): type_param = element.getAttributeNode('type_param') if type_param and type_param.value: type_param.value = '*' - elif element.tagName == 'failure': + elif element.tagName == 'failure' or element.tagName == 'skipped': source_line_pat = r'^.*[/\\](.*:)\d+\n' # Replaces the source line information with a normalized form. message = element.getAttributeNode('message') |