Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorMartin Hořeňovský2019-07-18 16:33:23 +0200
committerMartin Hořeňovský2019-07-18 16:33:57 +0200
commit52f3abadbb2da954597cda588b07c5e71a49f7e1 (patch)
tree4d66b352db5b899791ec2c256a2e9377d1ecb69b /scripts
parent53281b471f881b86d1ed037b3df0c239287552af (diff)
downloadcatch3-52f3abadbb2da954597cda588b07c5e71a49f7e1.tar.gz
Do not resolve symbolic path when sanitizing filepath during approvals
Fixes #1691
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/approvalTests.py8
-rw-r--r--scripts/scriptCommon.py1
2 files changed, 5 insertions, 4 deletions
diff --git a/scripts/approvalTests.py b/scripts/approvalTests.py
index bb01e6d5..6e1558dd 100755
--- a/scripts/approvalTests.py
+++ b/scripts/approvalTests.py
@@ -10,13 +10,13 @@ import re
import difflib
import scriptCommon
-from scriptCommon import catchPath
+from scriptCommon import catchPathSymbolic
if os.name == 'nt':
# Enable console colours on windows
os.system('')
-rootPath = os.path.join(catchPath, 'projects/SelfTest/Baselines')
+rootPath = os.path.join(catchPathSymbolic, 'projects/SelfTest/Baselines')
langFilenameParser = re.compile(r'(.+\.[ch]pp)')
filelocParser = re.compile(r'''
@@ -92,9 +92,9 @@ def diffFiles(fileA, fileB):
def normalizeFilepath(line):
- if catchPath in line:
+ if catchPathSymbolic in line:
# make paths relative to Catch root
- line = line.replace(catchPath + os.sep, '')
+ line = line.replace(catchPathSymbolic + os.sep, '')
m = langFilenameParser.match(line)
if m:
diff --git a/scripts/scriptCommon.py b/scripts/scriptCommon.py
index eadf9ff3..60f10bc0 100644
--- a/scripts/scriptCommon.py
+++ b/scripts/scriptCommon.py
@@ -4,6 +4,7 @@ import subprocess
catchPath = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0])))
+catchPathSymbolic = os.path.dirname(os.path.dirname(sys.argv[0]))
def getBuildExecutable():
if os.name == 'nt':