mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-02 18:07:59 +00:00
Trim paths in approval tests down to filenames
This commit is contained in:
parent
2f7a296897
commit
1e74938538
5 changed files with 1325 additions and 1323 deletions
|
@ -5,7 +5,9 @@ import re
|
|||
|
||||
from scriptCommon import catchPath
|
||||
|
||||
filenameParser = re.compile( r'\s*.*/(.*\..pp):([0-9]*)(.*)' )
|
||||
rootPath = os.path.join( catchPath, 'projects/SelfTest/Baselines' )
|
||||
|
||||
filenameParser = re.compile( r'.*?/(.*\..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]*"(.*)' )
|
||||
|
@ -40,9 +42,9 @@ def filterLine( line ):
|
|||
def approve( baseName, args ):
|
||||
global overallResult
|
||||
args[0:0] = [cmdPath]
|
||||
baselinesPath = os.path.join( catchPath, 'projects/SelfTest/Baselines/{0}.approved.txt'.format( baseName ) )
|
||||
rawResultsPath = os.path.join( catchPath, 'projects/SelfTest/Baselines/_{0}.tmp'.format( baseName ) )
|
||||
filteredResultsPath = os.path.join( catchPath, 'projects/SelfTest/Baselines/{0}.unapproved.txt'.format( baseName ) )
|
||||
baselinesPath = os.path.join( rootPath, '{0}.approved.txt'.format( baseName ) )
|
||||
rawResultsPath = os.path.join( rootPath, '_{0}.tmp'.format( baseName ) )
|
||||
filteredResultsPath = os.path.join( rootPath, '{0}.unapproved.txt'.format( baseName ) )
|
||||
|
||||
f = open( rawResultsPath, 'w' )
|
||||
subprocess.call( args, stdout=f, stderr=f )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue