Skip to content

Commit 9033b66

Browse files
committed
runtest.py now recognizes exit code 5
The unittest module's main() can exit with a code of 5, which means no tests were run. SCons/Script/MainTests.py currently has no tests, so this particular error code is expected - should not cause runtest to give up with an "unknown error code". Signed-off-by: Mats Wichmann <[email protected]>
1 parent 2566498 commit 9033b66

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
8585
Now matches the annotation and docstring (which were prematurely
8686
updated in 4.6). All SCons usage except unit test was already fully
8787
consistent with a bool.
88+
- The test runner now recognizes the unittest module's return code of 5,
89+
which means no tests were run. SCons/Script/MainTests.py currently
90+
has no tests, so this particular error code is expected - should not
91+
cause runtest to give up with an "unknown error code".
8892

8993

9094
RELEASE 4.7.0 - Sun, 17 Mar 2024 17:22:20 -0700

runtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ class SystemExecutor(RuntestBase):
417417
def execute(self, env):
418418
self.stderr, self.stdout, s = spawn_it(self.command_args, env)
419419
self.status = s
420-
if s < 0 or s > 2:
420+
if s < 0 or s > 2 and s != 5:
421421
sys.stdout.write("Unexpected exit status %d\n" % s)
422422

423423

0 commit comments

Comments
 (0)