mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-25 23:06:10 +01:00
Revert "Do not resolve symbolic path when sanitizing filepath during approvals"
This reverts commit 52f3abadbb
.
Opens #1691
This commit is contained in:
parent
52f3abadbb
commit
c424ca47f9
@ -10,13 +10,13 @@ import re
|
|||||||
import difflib
|
import difflib
|
||||||
|
|
||||||
import scriptCommon
|
import scriptCommon
|
||||||
from scriptCommon import catchPathSymbolic
|
from scriptCommon import catchPath
|
||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
# Enable console colours on windows
|
# Enable console colours on windows
|
||||||
os.system('')
|
os.system('')
|
||||||
|
|
||||||
rootPath = os.path.join(catchPathSymbolic, 'projects/SelfTest/Baselines')
|
rootPath = os.path.join(catchPath, 'projects/SelfTest/Baselines')
|
||||||
|
|
||||||
langFilenameParser = re.compile(r'(.+\.[ch]pp)')
|
langFilenameParser = re.compile(r'(.+\.[ch]pp)')
|
||||||
filelocParser = re.compile(r'''
|
filelocParser = re.compile(r'''
|
||||||
@ -92,9 +92,9 @@ def diffFiles(fileA, fileB):
|
|||||||
|
|
||||||
|
|
||||||
def normalizeFilepath(line):
|
def normalizeFilepath(line):
|
||||||
if catchPathSymbolic in line:
|
if catchPath in line:
|
||||||
# make paths relative to Catch root
|
# make paths relative to Catch root
|
||||||
line = line.replace(catchPathSymbolic + os.sep, '')
|
line = line.replace(catchPath + os.sep, '')
|
||||||
|
|
||||||
m = langFilenameParser.match(line)
|
m = langFilenameParser.match(line)
|
||||||
if m:
|
if m:
|
||||||
|
@ -4,7 +4,6 @@ import subprocess
|
|||||||
|
|
||||||
|
|
||||||
catchPath = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0])))
|
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():
|
def getBuildExecutable():
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
|
Loading…
Reference in New Issue
Block a user