diff options
| author | Phil Nash | 2013-09-30 07:39:06 +0100 |
|---|---|---|
| committer | Phil Nash | 2013-09-30 07:39:06 +0100 |
| commit | 1e74938538544afde5e08c0ec667ad7e6ddad9a9 (patch) | |
| tree | ce8464f2c77417972d7e3a5acdb1dee1c98c0654 /scripts | |
| parent | 2f7a296897e7b3080c96d48e2ffd8eac59136df1 (diff) | |
| download | catch3-1e74938538544afde5e08c0ec667ad7e6ddad9a9.tar.gz | |
Trim paths in approval tests down to filenames
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/approvalTests.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/approvalTests.py b/scripts/approvalTests.py index 12ea5a73..ad28cf95 100644 --- a/scripts/approvalTests.py +++ b/scripts/approvalTests.py @@ -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 ) |