Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(970)

Unified Diff: test/gtest_xml_test_utils.py

Issue 4627072: the XML report should contain the date & time when the test program was run Base URL: http://googletest.googlecode.com/svn/trunk/
Patch Set: Created 12 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/gtest_xml_output_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/gtest_xml_test_utils.py
===================================================================
--- test/gtest_xml_test_utils.py (revision 586)
+++ test/gtest_xml_test_utils.py (working copy)
@@ -151,6 +151,8 @@
* The "time" attribute of <testsuites>, <testsuite> and <testcase>
elements is replaced with a single asterisk, if it contains
only digit characters.
+ * The "datetime" attribute of <testsuites> elements is replaced with a single asterisk, if it contains
+ a valid ISO8601 datetime value
* The "type_param" attribute of <testcase> elements is replaced with a
single asterisk (if it sn non-empty) as it is the type name returned
by the compiler and is platform dependent.
@@ -159,7 +161,10 @@
* The directory names in file paths are removed.
* The stack traces are removed.
"""
-
+
+ if element.tagName == "testsuites":
+ datetime = element.getAttributeNode("datetime")
+ datetime.value = re.sub(r"^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$", "*", datetime.value)
if element.tagName in ("testsuites", "testsuite", "testcase"):
time = element.getAttributeNode("time")
time.value = re.sub(r"^\d+(\.\d+)?$", "*", time.value)
« no previous file with comments | « test/gtest_xml_output_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b