Standardize exit codes for various failures

The main reason for this is to be able to distinguish between
different errors (or "errors") based on the return code. Before
this change, it was impossible to use the exit code to figure out
whether a test binary failed because all tests were skipped or
because exactly 4 assertions have failed.

This meant that using `catch_discover_tests` and telling it to
check for exit code == 4 to determine skipped tests could lead to
false negatives.
This commit is contained in:
Martin Hořeňovský
2024-09-13 21:33:41 +02:00
parent 18df97df00
commit ce22c0fe8a
2 changed files with 21 additions and 17 deletions

View File

@@ -52,7 +52,7 @@ try:
)
stdout = ret.stdout
except subprocess.SubprocessError as ex:
if ex.returncode == 1:
if ex.returncode == 42:
# The test cases are allowed to fail.
test_passing = False
stdout = ex.stdout