mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 21:05:39 +02:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user