[PATCH 1/1] Don't report a test/ext test with errors as SKIPPED

0 views
Skip to first unread message

Rob Browning

unread,
Jul 22, 2026, 4:45:42 PM (2 days ago) Jul 22
to bup-...@googlegroups.com
Move the BupSubprocTestRunner.runtest() check for skipped tests to the
end. Previously it would act before the check for failures and report
the entire test file as skipped, rather than failed.

Thanks to Johannes Berg for reporting the problem and proposing the
solution.

Signed-off-by: Rob Browning <r...@defaultvalue.org>
Tested-by: Rob Browning <r...@defaultvalue.org>
---

Pushed to main.

test/ext/conftest.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/ext/conftest.py b/test/ext/conftest.py
index c5f80d5b..4f6c1e70 100644
--- a/test/ext/conftest.py
+++ b/test/ext/conftest.py
@@ -36,11 +36,6 @@ class BupSubprocTestRunner(pytest.Item):
sys.stdout.flush()
byte_stream(sys.stdout).write(out)
lines = out.splitlines()
- for line in lines:
- if line.startswith(b'!') and line.lower().endswith(b' skip ok'):
- # drop the leading file/line, etc. and trailing skip ok
- pytest.skip(line.decode('utf-8').split(maxsplit=2)[-1][:-8])
- return
failures = [line for line in lines
if (line.startswith(b'!')
and line.lower().endswith(b' failed'))]
@@ -50,6 +45,11 @@ class BupSubprocTestRunner(pytest.Item):
raise BupSubprocFailure('%s failed (exit %d, %d failures)'
% (cmd, p.returncode, len(failures)),
p.returncode, failures)
+ for line in lines:
+ if line.startswith(b'!') and line.lower().endswith(b' skip ok'):
+ # drop the leading file/line, etc. and trailing skip ok
+ pytest.skip(line.decode('utf-8').split(maxsplit=2)[-1][:-8])
+ return

def repr_failure(self, excinfo, style=None):
# We ignore the style, which appears to be one of None,
--
2.47.3

Reply all
Reply to author
Forward
0 new messages