Patchwork [2,of,2,STABLE] tests: test-check-code-hg.t works for all files to check

login
register
mail settings
Submitter Simon Heimberg
Date July 22, 2013, 8:33 a.m.
Message ID <cffb30af3eb2a9f61346.1374482020@lapsi.heimberg.home>
Download mbox | patch
Permalink /patch/1942/
State Accepted
Commit 9aee3d01439407c66fedc30d52b8e1845387b3bb
Headers show

Comments

Simon Heimberg - July 22, 2013, 8:33 a.m.
# HG changeset patch
# User Simon Heimberg <simohe@besonet.ch>
# Date 1374480293 -7200
# Node ID cffb30af3eb2a9f613464ef19011574c5c9714a0
# Parent  e6de3183429487a11ef1c28bc1562aa85617732b
tests: test-check-code-hg.t works for all files to check

with xargs, backslashes are eaten up. Convert them to slashes therefore.
This is only a problem with ls (on windows). hg manifest returns slashes.

The pipe char is moved before the line end for telling check-code.py that sed
does not modify the output.
Matt Mackall - July 25, 2013, 5:57 a.m.
On Mon, 2013-07-22 at 10:33 +0200, Simon Heimberg wrote:
> # HG changeset patch
> # User Simon Heimberg <simohe@besonet.ch>
> # Date 1374480293 -7200
> # Node ID cffb30af3eb2a9f613464ef19011574c5c9714a0
> # Parent  e6de3183429487a11ef1c28bc1562aa85617732b
> tests: test-check-code-hg.t works for all files to check

These are queued for stable, thanks.

Patch

diff -r e6de31834294 -r cffb30af3eb2 tests/test-check-code-hg.t
--- a/tests/test-check-code-hg.t	Mon Jul 22 10:04:45 2013 +0200
+++ b/tests/test-check-code-hg.t	Mon Jul 22 10:04:53 2013 +0200
@@ -26,6 +26,5 @@ 
 
 New errors are not allowed. Warnings are strongly discouraged.
 
-  $ { hg manifest 2>/dev/null; ls "$TESTTMP"/*.py; } \
-  >   | xargs "$check_code" --warnings --per-file=0 \
-  >   || false
+  $ { hg manifest 2>/dev/null; ls "$TESTTMP"/*.py | sed 's-\\-/-g'; } |
+  >   xargs "$check_code" --warnings --per-file=0 || false