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

summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorMartin Hořeňovský2017-04-29 17:52:12 +0200
committerMartin Hořeňovský2017-04-29 17:52:12 +0200
commita3ceb8f007266d9bb3fbfa5dc1b77108adbbd781 (patch)
treead651f099185564edb34cc2f1b6fece1cc477733 /scripts
parentb8194322718a1f61d3309023052c87090fa6bae3 (diff)
downloadcatch3-a3ceb8f007266d9bb3fbfa5dc1b77108adbbd781.tar.gz
Approval tests now can deal with different expansions of errno
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/approvalTests.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/approvalTests.py b/scripts/approvalTests.py
index b1b1d65d..0b0d036c 100755
--- a/scripts/approvalTests.py
+++ b/scripts/approvalTests.py
@@ -36,6 +36,13 @@ exeNameParser = re.compile(r'''
# This is a hack until something more reasonable is figured out
specialCaseParser = re.compile(r'file\((\d+)\)')
+# errno macro expands into various names depending on platform, so we need to fix them up as well
+errnoParser = re.compile(r'''
+ \(\*__errno_location\ \(\)\)
+ |
+ \(\*__error\(\)\)
+''', re.VERBOSE)
+
if len(sys.argv) == 2:
cmdPath = sys.argv[1]
else:
@@ -90,6 +97,7 @@ def filterLine(line):
line = durationsParser.sub(' time="{duration}"', line)
line = timestampsParser.sub(' timestamp="{iso8601-timestamp}"', line)
line = specialCaseParser.sub('file:\g<1>', line)
+ line = errnoParser.sub('errno', line)
return line