##// END OF EJS Templates
run-tests: add #require to abort full test...
Matt Mackall -
r22045:769198c6 default
parent child Browse files
Show More
@@ -810,7 +810,15 b' class TTest(Test):'
810 for n, l in enumerate(lines):
810 for n, l in enumerate(lines):
811 if not l.endswith('\n'):
811 if not l.endswith('\n'):
812 l += '\n'
812 l += '\n'
813 if l.startswith('#if'):
813 if l.startswith('#require'):
814 lsplit = l.split()
815 if len(lsplit) < 2 or lsplit[0] != '#require':
816 after.setdefault(pos, []).append(' !!! invalid #require\n')
817 if not self._hghave(lsplit[1:]):
818 script = ["exit 80\n"]
819 break
820 after.setdefault(pos, []).append(l)
821 elif l.startswith('#if'):
814 lsplit = l.split()
822 lsplit = l.split()
815 if len(lsplit) < 2 or lsplit[0] != '#if':
823 if len(lsplit) < 2 or lsplit[0] != '#if':
816 after.setdefault(pos, []).append(' !!! invalid #if\n')
824 after.setdefault(pos, []).append(' !!! invalid #if\n')
@@ -309,7 +309,7 b' Skips'
309 ================
309 ================
310 $ cat > test-skip.t <<EOF
310 $ cat > test-skip.t <<EOF
311 > $ echo xyzzy
311 > $ echo xyzzy
312 > $ exit 80
312 > #require false
313 > EOF
313 > EOF
314 $ $TESTDIR/run-tests.py --with-hg=`which hg` --nodiff
314 $ $TESTDIR/run-tests.py --with-hg=`which hg` --nodiff
315 !.s
315 !.s
General Comments 0
You need to be logged in to leave comments. Login now