diff options
| author | Martin Hořeňovský | 2020-02-03 20:29:36 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-03 20:29:36 +0100 |
| commit | 34bc56340dbb22c11d5bae8dc6018df53626281e (patch) | |
| tree | e5c88e894d81712352d99bec4fd788081a8c227a /tools/scripts | |
| parent | c3a5e21648ba4cde517ed17682b1d61833c27679 (diff) | |
| download | catch3-34bc56340dbb22c11d5bae8dc6018df53626281e.tar.gz | |
Normalize TAP approvals to avoid massive diffs for every change
Diffstat (limited to 'tools/scripts')
| -rwxr-xr-x | tools/scripts/approvalTests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/scripts/approvalTests.py b/tools/scripts/approvalTests.py index bfe243ce..04463d78 100755 --- a/tools/scripts/approvalTests.py +++ b/tools/scripts/approvalTests.py @@ -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) |