mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-02 01:47:57 +00:00
Redacted test durations from JUnit reporter output in approval test script
This commit is contained in:
parent
d68510d6e3
commit
11b5179ceb
2 changed files with 194 additions and 189 deletions
|
@ -8,6 +8,7 @@ from scriptCommon import catchPath
|
|||
filenameParser = re.compile( r'\s*.*/(.*\..pp):([0-9]*)(.*)' )
|
||||
lineNumberParser = re.compile( r'(.*)line="[0-9]*"(.*)' )
|
||||
hexParser = re.compile( r'(.*)\b(0[xX][0-9a-fA-F]+)\b(.*)' )
|
||||
durationsParser = re.compile( r'(.*)time="[0-9]*\.[0-9]*"(.*)' )
|
||||
|
||||
#catchPath = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0])))
|
||||
|
||||
|
@ -45,6 +46,10 @@ for line in rawFile:
|
|||
line = m.group(1) + "0x<hex digits>" + m.group(3)
|
||||
else:
|
||||
break
|
||||
m = durationsParser.match( line )
|
||||
if m:
|
||||
line = m.group(1) + 'time="{duration}"' + m.group(2)
|
||||
|
||||
filteredFile.write( line.rstrip() + "\n" )
|
||||
filteredFile.close()
|
||||
rawFile.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue