[PATCH] run-tests: automatically add (glob) to "saved backup bundle to" lines
Mads Kiilerich
mads at kiilerich.com
Fri Jan 2 02:25:39 UTC 2015
# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1417050270 -3600
# Thu Nov 27 02:04:30 2014 +0100
# Node ID cad71687625a2776ee098ed399c2ed2ae774d130
# Parent 9a02f75179390b109da0b9e2af6a7506c087f762
run-tests: automatically add (glob) to "saved backup bundle to" lines
Avoid spending too much time adding (glob) after running run-tests -i. This
doesn't handle all cases but it helps.
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -627,6 +627,8 @@ class Test(unittest.TestCase):
(r':%s\b' % self._startport, ':$HGPORT'),
(r':%s\b' % (self._startport + 1), ':$HGPORT1'),
(r':%s\b' % (self._startport + 2), ':$HGPORT2'),
+ (r'(saved backup bundle to .*\.hg)( \(glob\))?',
+ lambda m: m.group(1) + ' (glob)'),
]
if os.name == 'nt':
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
@@ -297,16 +297,19 @@ View the fix
Accept the fix
+ $ echo 'saved backup bundle to $TESTTMP/foo.hg' >> test-failure.t
+ $ echo 'saved backup bundle to $TESTTMP/bar.hg (glob)' >> test-failure.t
$ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` -i
--- $TESTTMP/test-failure.t
+++ $TESTTMP/test-failure.t.err
- @@ -1,4 +1,4 @@
+ @@ -1,5 +1,5 @@
$ echo babar
- rataxes
+ babar
This is a noop statement so that
this test is still more bytes than success.
+ saved backup bundle to $TESTTMP/foo.hg (glob)
Accept this change? [n] ..
# Ran 2 tests, 0 skipped, 0 warned, 0 failed.
@@ -315,6 +318,8 @@ Accept the fix
babar
This is a noop statement so that
this test is still more bytes than success.
+ saved backup bundle to $TESTTMP/foo.hg (glob)
+ saved backup bundle to $TESTTMP/bar.hg (glob)
(reinstall)
$ mv backup test-failure.t
More information about the Mercurial-devel
mailing list