summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_regrtest.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-09-05 01:09:42 (GMT)
committerGitHub <noreply@github.com>2023-09-05 01:09:42 (GMT)
commit1170d5a292b46f754cd29c245a040f1602f70301 (patch)
tree41699059e3e3daac65260d429f5a186b38c24b4e /Lib/test/test_regrtest.py
parent676593859e75d4c3543d143092b77f55389006e4 (diff)
downloadcpython-1170d5a292b46f754cd29c245a040f1602f70301.zip
cpython-1170d5a292b46f754cd29c245a040f1602f70301.tar.gz
cpython-1170d5a292b46f754cd29c245a040f1602f70301.tar.bz2
gh-108834: regrtest --fail-rerun exits with code 5 (#108896)
When the --fail-rerun option is used and a test fails and then pass, regrtest now uses exit code 5 ("rerun) instead of 2 ("bad test").
Diffstat (limited to 'Lib/test/test_regrtest.py')
-rw-r--r--Lib/test/test_regrtest.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
index eb321c4..c5fb3dc 100644
--- a/Lib/test/test_regrtest.py
+++ b/Lib/test/test_regrtest.py
@@ -34,6 +34,7 @@ LOG_PREFIX = r'[0-9]+:[0-9]+:[0-9]+ (?:load avg: [0-9]+\.[0-9]{2} )?'
EXITCODE_BAD_TEST = 2
EXITCODE_ENV_CHANGED = 3
EXITCODE_NO_TESTS_RAN = 4
+EXITCODE_RERUN_FAIL = 5
EXITCODE_INTERRUPTED = 130
TEST_INTERRUPTED = textwrap.dedent("""
@@ -1265,10 +1266,10 @@ class ArgsTestCase(BaseTestCase):
stats=TestStats(3, 1))
os_helper.unlink(marker_filename)
- # with --fail-rerun, exit code EXITCODE_BAD_TEST
+ # with --fail-rerun, exit code EXITCODE_RERUN_FAIL
# on "FAILURE then SUCCESS" state.
output = self.run_tests("--rerun", "--fail-rerun", testname,
- exitcode=EXITCODE_BAD_TEST)
+ exitcode=EXITCODE_RERUN_FAIL)
self.check_executed_tests(output, [testname],
rerun=Rerun(testname,
match="test_fail_once",