Submitter | Simon Heimberg |
---|---|
Date | July 13, 2013, 10:25 p.m. |
Message ID | <d9fa7503933a2491fc1b.1373754313@lapsi.heimberg.home> |
Download | mbox | patch |
Permalink | /patch/1883/ |
State | Superseded, archived |
Headers | show |
Comments
On Sun, 2013-07-14 at 00:25 +0200, Simon Heimberg wrote: > # HG changeset patch > # User Simon Heimberg <simohe@besonet.ch> > # Date 1373752948 -7200 > # Node ID d9fa7503933a2491fc1bb0d2f5c921655d8f9f37 > # Parent 9baf643dca269dde0791972e6f4f092b1913ee2d > run-tests: do not fail when the path sep does not match on windows Why? Are we giving up?
On Wed, 2013-07-17 at 17:09 -0500, Kevin Bullock wrote: > On 17 Jul 2013, at 3:46 PM, Matt Mackall wrote: > > > On Sun, 2013-07-14 at 00:25 +0200, Simon Heimberg wrote: > >> # HG changeset patch > >> # User Simon Heimberg <simohe@besonet.ch> > >> # Date 1373752948 -7200 > >> # Node ID d9fa7503933a2491fc1bb0d2f5c921655d8f9f37 > >> # Parent 9baf643dca269dde0791972e6f4f092b1913ee2d > >> run-tests: do not fail when the path sep does not match on windows > > > > Why? Are we giving up? > > I understood this to mean "print a warning, but don't bail out on the rest of the test"? Are we going soft on crime? Why are we making something that is supposed to be a failure a warning? Why is less strict forward progress?
Patch
diff -r 9baf643dca26 -r d9fa7503933a tests/run-tests.py --- a/tests/run-tests.py Sam Jul 13 23:58:01 2013 +0200 +++ b/tests/run-tests.py Son Jul 14 00:02:28 2013 +0200 @@ -626,6 +626,8 @@ if (el.endswith(" (re)\n") and rematch(el[:-6], l) or el.endswith(" (glob)\n") and globmatch(el[:-8], l)): return True + elif os.altsep and l.replace('\\', '/') == el: + return 'slash' return False def tsttest(test, wd, options, replacements, env): @@ -781,8 +783,12 @@ if pos in expected and expected[pos]: el = expected[pos].pop(0) - if linematch(el, lout): + r = linematch(el, lout) + if r: postout.append(" " + el) + if r == 'slash': + log('\ninfo, missing glob in test %s (after line %d): %s' + % (test, pos, el)) else: if needescape(lout): lout = stringescape(lout.rstrip('\n')) + " (esc)\n"