[PATCH 1 of 3] tests: check-code all python files in one run

Matt Mackall mpm at selenic.com
Fri Jun 14 13:54:57 CDT 2013


On Fri, 2013-06-14 at 14:15 -0400, Augie Fackler wrote:
> On Thu, Jun 13, 2013 at 01:48:23AM +0200, Simon Heimberg wrote:
> > # HG changeset patch
> > # User simon at laptop-tosh
> > # Date 1371080641 -7200
> > # Node ID e15a377d7f040a8bf820362ed6f5343366b14f4e
> > # Parent  78c948ed59fd6c45ce10bfc67b213e8fcdb3b0cb
> > tests: check-code all python files in one run
> >
> > diff -r 78c948ed59fd -r e15a377d7f04 tests/test-check-code-hg.t
> > --- a/tests/test-check-code-hg.t	Don Jun 13 01:44:01 2013 +0200
> > +++ b/tests/test-check-code-hg.t	Don Jun 13 01:44:01 2013 +0200
> > @@ -6,13 +6,7 @@
> >    >     exit 80
> >    > fi
> >
> > -New errors are not allowed. Warnings are strongly discouraged.
> > -
> > -  $ hg manifest 2>/dev/null \
> > -  >   | xargs "$check_code" --warnings --nolineno --per-file=0 \
> > -  >   || false
> > -
> > -Check Python files without py extension
> > +Prepare check for Python files without py extension
> >
> >    $ cp \
> >    >   hg \
> > @@ -25,5 +19,9 @@
> >    >   contrib/undumprevlog \
> >    >   "$TESTTMP"/
> >    $ for f in "$TESTTMP"/*; do cp "$f" "$f.py"; done
> > -  $ "$check_code" --warnings --nolineno --per-file=0 "$TESTTMP"/*.py \
> > -  >   || false
> > +
> > +New errors are not allowed. Warnings are strongly discouraged.
> > +
> > + $ hg manifest 2>/dev/null \
> > + >   | xargs "$check_code" "$TESTTMP"/*.py --warnings --nolineno --per-file=0 \
> > + >   || false
> 
> Couldn't this end up checking files from 'hg manifest' more than once
> if the argv got too long for the platform? I have no idea if we're in
> any danger of hitting that limit.

Not on Linux, which is now only bounded by ulimit. But might get into
trouble on AIX, Solaris, etc., which have much more finite limits.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list