diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -1373,10 +1373,11 @@ lsplit = l.split() if len(lsplit) < 2 or lsplit[0] != b'#require': after.setdefault(pos, []).append(' !!! invalid #require\n') - haveresult, message = self._hghave(lsplit[1:]) - if not haveresult: - script = [b'echo "%s"\nexit 80\n' % message] - break + if not skipping: + haveresult, message = self._hghave(lsplit[1:]) + if not haveresult: + script = [b'echo "%s"\nexit 80\n' % message] + break after.setdefault(pos, []).append(l) elif l.startswith(b'#if'): lsplit = l.split() diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t --- a/tests/test-run-tests.t +++ b/tests/test-run-tests.t @@ -921,16 +921,24 @@ ================ $ cat > test-skip.t < $ echo xyzzy + > #if true > #require false + > #end + > EOF + $ cat > test-noskip.t < #if false + > #require false + > #endif > EOF $ rt --nodiff - !.s + !.s. Skipped test-skip.t: missing feature: nail clipper Failed test-failure.t: output changed - # Ran 2 tests, 1 skipped, 1 failed. + # Ran 3 tests, 1 skipped, 1 failed. python hash seed: * (glob) [1] + $ rm test-noskip.t $ rt --keyword xyzzy .s Skipped test-skip.t: missing feature: nail clipper