##// END OF EJS Templates
run-tests: report missing feature for skipped tests
timeless -
r27564:80b53082 default
parent child Browse files
Show More
@@ -940,11 +940,11 b' class TTest(Test):'
940 sys.exit(1)
940 sys.exit(1)
941
941
942 if ret != 0:
942 if ret != 0:
943 return False
943 return False, stdout
944
944
945 if 'slow' in reqs:
945 if 'slow' in reqs:
946 self._timeout = self._slowtimeout
946 self._timeout = self._slowtimeout
947 return True
947 return True, None
948
948
949 def _parsetest(self, lines):
949 def _parsetest(self, lines):
950 # We generate a shell script which outputs unique markers to line
950 # We generate a shell script which outputs unique markers to line
@@ -989,8 +989,9 b' class TTest(Test):'
989 lsplit = l.split()
989 lsplit = l.split()
990 if len(lsplit) < 2 or lsplit[0] != b'#require':
990 if len(lsplit) < 2 or lsplit[0] != b'#require':
991 after.setdefault(pos, []).append(' !!! invalid #require\n')
991 after.setdefault(pos, []).append(' !!! invalid #require\n')
992 if not self._hghave(lsplit[1:]):
992 haveresult, message = self._hghave(lsplit[1:])
993 script = [b"exit 80\n"]
993 if not haveresult:
994 script = [b'echo "%s"\nexit 80\n' % message]
994 break
995 break
995 after.setdefault(pos, []).append(l)
996 after.setdefault(pos, []).append(l)
996 elif l.startswith(b'#if'):
997 elif l.startswith(b'#if'):
@@ -999,7 +1000,7 b' class TTest(Test):'
999 after.setdefault(pos, []).append(' !!! invalid #if\n')
1000 after.setdefault(pos, []).append(' !!! invalid #if\n')
1000 if skipping is not None:
1001 if skipping is not None:
1001 after.setdefault(pos, []).append(' !!! nested #if\n')
1002 after.setdefault(pos, []).append(' !!! nested #if\n')
1002 skipping = not self._hghave(lsplit[1:])
1003 skipping = not self._hghave(lsplit[1:])[0]
1003 after.setdefault(pos, []).append(l)
1004 after.setdefault(pos, []).append(l)
1004 elif l.startswith(b'#else'):
1005 elif l.startswith(b'#else'):
1005 if skipping is None:
1006 if skipping is None:
@@ -418,7 +418,7 b' timeouts'
418 > cat test-timeout.t >> test-slow-timeout.t
418 > cat test-timeout.t >> test-slow-timeout.t
419 $ rt --timeout=1 --slowtimeout=3 test-timeout.t test-slow-timeout.t
419 $ rt --timeout=1 --slowtimeout=3 test-timeout.t test-slow-timeout.t
420 st
420 st
421 Skipped test-slow-timeout.t: skipped
421 Skipped test-slow-timeout.t: missing feature: allow slow tests
422 Failed test-timeout.t: timed out
422 Failed test-timeout.t: timed out
423 # Ran 1 tests, 1 skipped, 0 warned, 1 failed.
423 # Ran 1 tests, 1 skipped, 0 warned, 1 failed.
424 python hash seed: * (glob)
424 python hash seed: * (glob)
@@ -460,7 +460,7 b' Skips'
460 > EOF
460 > EOF
461 $ rt --nodiff
461 $ rt --nodiff
462 !.s
462 !.s
463 Skipped test-skip.t: skipped
463 Skipped test-skip.t: missing feature: nail clipper
464 Failed test-failure.t: output changed
464 Failed test-failure.t: output changed
465 # Ran 2 tests, 1 skipped, 0 warned, 1 failed.
465 # Ran 2 tests, 1 skipped, 0 warned, 1 failed.
466 python hash seed: * (glob)
466 python hash seed: * (glob)
@@ -468,14 +468,14 b' Skips'
468
468
469 $ rt --keyword xyzzy
469 $ rt --keyword xyzzy
470 .s
470 .s
471 Skipped test-skip.t: skipped
471 Skipped test-skip.t: missing feature: nail clipper
472 # Ran 2 tests, 2 skipped, 0 warned, 0 failed.
472 # Ran 2 tests, 2 skipped, 0 warned, 0 failed.
473
473
474 Skips with xml
474 Skips with xml
475 $ rt --keyword xyzzy \
475 $ rt --keyword xyzzy \
476 > --xunit=xunit.xml
476 > --xunit=xunit.xml
477 .s
477 .s
478 Skipped test-skip.t: skipped
478 Skipped test-skip.t: missing feature: nail clipper
479 # Ran 2 tests, 2 skipped, 0 warned, 0 failed.
479 # Ran 2 tests, 2 skipped, 0 warned, 0 failed.
480 $ cat xunit.xml
480 $ cat xunit.xml
481 <?xml version="1.0" encoding="utf-8"?>
481 <?xml version="1.0" encoding="utf-8"?>
@@ -510,7 +510,7 b' test for --json'
510
510
511 ERROR: test-failure.t output changed
511 ERROR: test-failure.t output changed
512 !.s
512 !.s
513 Skipped test-skip.t: skipped
513 Skipped test-skip.t: missing feature: nail clipper
514 Failed test-failure.t: output changed
514 Failed test-failure.t: output changed
515 # Ran 2 tests, 1 skipped, 0 warned, 1 failed.
515 # Ran 2 tests, 1 skipped, 0 warned, 1 failed.
516 python hash seed: * (glob)
516 python hash seed: * (glob)
@@ -558,7 +558,7 b' Test that failed test accepted through i'
558 This is a noop statement so that
558 This is a noop statement so that
559 this test is still more bytes than success.
559 this test is still more bytes than success.
560 Accept this change? [n] ..s
560 Accept this change? [n] ..s
561 Skipped test-skip.t: skipped
561 Skipped test-skip.t: missing feature: nail clipper
562 # Ran 2 tests, 1 skipped, 0 warned, 0 failed.
562 # Ran 2 tests, 1 skipped, 0 warned, 0 failed.
563
563
564 $ cat report.json
564 $ cat report.json
@@ -673,7 +673,7 b' test support for --allow-slow-tests'
673 > EOF
673 > EOF
674 $ rt $HGTEST_RUN_TESTS_PURE test-very-slow-test.t
674 $ rt $HGTEST_RUN_TESTS_PURE test-very-slow-test.t
675 s
675 s
676 Skipped test-very-slow-test.t: skipped
676 Skipped test-very-slow-test.t: missing feature: allow slow tests
677 # Ran 0 tests, 1 skipped, 0 warned, 0 failed.
677 # Ran 0 tests, 1 skipped, 0 warned, 0 failed.
678 $ rt $HGTEST_RUN_TESTS_PURE --allow-slow-tests test-very-slow-test.t
678 $ rt $HGTEST_RUN_TESTS_PURE --allow-slow-tests test-very-slow-test.t
679 .
679 .
General Comments 0
You need to be logged in to leave comments. Login now