Normalize TAP approvals to avoid massive diffs for every change

This commit is contained in:
Martin Hořeňovský 2020-02-03 20:29:36 +01:00
parent c3a5e21648
commit 34bc56340d
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
2 changed files with 1660 additions and 1655 deletions

File diff suppressed because it is too large Load Diff

View File

@ -70,6 +70,8 @@ nanParser = re.compile(r'''
__builtin_nanf\("0x<hex\ digits>"\) # The weird content of the brackets is there because a different parser has already ran before this one
''', re.VERBOSE)
# The weird OR is there to always have at least empty string for group 1
tapTestNumParser = re.compile(r'^(not |)?ok (\d+) -')
if len(sys.argv) == 2:
cmdPath = sys.argv[1]
@ -125,6 +127,9 @@ def filterLine(line, isCompact):
line = line.replace(': FAILED', ': failed')
line = line.replace(': PASSED', ': passed')
# strip out the test order number in TAP to avoid massive diffs for every change
line = tapTestNumParser.sub("\g<1>ok {test-number} -", line)
# strip Catch version number
line = versionParser.sub("<version>", line)