Commit Graph

19 Commits

Author SHA1 Message Date
Martin Hořeňovský
ac93f19437
Improved path normalization in approvalTests.py
Instead of redoing the whole line where path was found, only the
directory part of the path is removed, instead of removing all
of the line before the path starts.

This results in slight change in how junit and sonarqube approvals
come out, and significant change in how TeamCity reporter approvals
come out. This latter difference is the reason for the change,
as now the lines with `testFailed` and `testIgnored` messages
are not completely butchered.
2023-01-01 20:27:59 +01:00
Martin Hořeňovský
297a17593f
Cleanup the helper scripts
* Remove from __future__ import print_function, because we
  no longer support Python2.
* Clean out unused parts of tools/scripts/scriptCommon.py
* Move appveyorMergeCoverageScript to Python3
* Update user reporting in *release scripts
* Cleanup module imports
2022-11-06 21:23:16 +01:00
Martin Hořeňovský
0c75caf77b
Don't write ApprovalTests' temporary files into the source tree
This has two effects:
 1) This significantly improves the performance of ApprovalTests
    run in WSL, because running the massively multi-reporter
    test would cause lots of small and parallel writes across the
    WSL-Windows FS boundary, completely mudering performance.

 2) ApprovalTests can be run from multiple build dirs in parallel,
    as long as they do not fail. However, if they do fail,
    the multiple runs will still step on each other toes when
    writing the unapproved files for user.
2022-11-06 00:11:38 +01:00
Martin Hořeňovský
fa9416426a
Refactor shared args in approvalTests.py 2022-06-14 23:42:00 +02:00
Martin Hořeňovský
338e4ec1f8
Force disable console colours for tests that regex check output
Fixes #2458
2022-06-14 23:24:06 +02:00
Martin Hořeňovský
d9b0a38f81
Report Catch2's version in the xml reporter output 2022-05-03 19:46:35 +02:00
Martin Hořeňovský
423e1d2ebb
Integrate the new reporter specs into Catch2
This means that the CLI interface now uses the new key-value oriented
reporter spec, the common reporter base creates the colour implementation
based on the reporter-specific configuration, and it also stores the
custom configuration options for each reporter instance.

Closes #339 as it allows per-reporter forcing of ansi colour codes.
2022-04-07 12:50:08 +02:00
Martin Hořeňovský
4ff8b27bb6
Cleanups output normalization in ApprovalTests
Removed:
 * NaN normalization
 * INFINITY normalization
 * errno normalization
 * Completely unused duration regex

Tests using these macros should be tagged `[approvals]`
so they are not run as part of approval tests.

Also simplified regex for the test's executable filename,
and hidden some tests relying on nullptr normalization.
2022-01-27 21:11:51 +01:00
Martin Hořeňovský
dc86d51af2
Update version string to mention Catch2 2022-01-27 20:15:05 +01:00
Martin Jeřábek
ccd67b293d Add support for multiple parallel reporters
This requires a bunch of different changes across the reporter
subsystem.

* We need to handle multiple reporters and their differing
  preferences in `ListeningReporter`, e.g. what to do when
  we mix reporters that capture and don't capture stdout.
* We need to change how the reporter is given output and
  how we parse reporter's output destination from CLI.
* Approval tests need to handle multireporter option
2022-01-01 14:02:23 +01:00
Martin Hořeňovský
c4df47c246
Approvals normalize paths with both backward and forward slash 2021-11-13 22:10:25 +01:00
Martin Hořeňovský
de67278e14
JUnit reporter uses only 3 decimal places when reporting durations
We used to use whatever precision we ended up having from C++'s
stdlib. However, some relatively popular tools, like Jenkins,
use Maven SureFire XML schema to validate JUnit test reports, and
Maven SureFire schema requires the duration to have at most 3
decimal places.

For compatibility, the JUnit reporter will now respect this
limitation.

Closes #2221
2021-10-10 22:10:48 +02:00
John Zimmermann
ba81505168 Do not match exact amount of spaces for errno macro expansion in approvalTests.py
E.g. musl libc expands errno() to __errno_location() without a space between, glibc has 1 space.
2021-01-08 11:31:28 +01:00
Martin Hořeňovský
0d8eeec557
Move all scripts to Python3 2020-04-29 21:28:52 +02:00
Martin Hořeňovský
63b7d6f98e
Improve erasure of test numbers in TAP approvals 2020-02-13 14:22:18 +01:00
Martin Hořeňovský
34bc56340d
Normalize TAP approvals to avoid massive diffs for every change 2020-02-03 20:29:36 +01:00
Martin Hořeňovský
1327946785
Add all in-repo reporters to approval tests 2020-02-02 15:04:19 +01:00
Martin Hořeňovský
827733fe81
Improve approval tests handling off tagged devel versions 2020-01-25 11:23:40 +01:00
Martin Hořeňovský
91ee07e08c
Moved scripts/ to tools/scripts/ 2019-12-06 11:53:31 +01:00