mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
fef5e81c64
Summary: This diff removes "unset HGRCPATH" to try to run tests in a more controlled environment. And skip the test if system HG looks broken. Test Plan: arc unit Reviewers: simpkins, #mercurial, stash Reviewed By: stash Subscribers: net-systems-diffs@fb.com, mjpieters, medson Differential Revision: https://phabricator.intern.facebook.com/D5263484 Signature: t1:5263484:1497604378:28ec94c33ba77680c8d2325a8fa36457e0eb8c91
22 lines
648 B
Perl
22 lines
648 B
Perl
#require test-repo pyflakes
|
|
|
|
$ . $TESTDIR/require-core-hg.sh tests/filterpyflakes.py
|
|
|
|
This file is backported from mercurial/tests/test-check-pyflakes.t.
|
|
It differs slightly to fix paths.
|
|
|
|
$ . "$TESTDIR/helper-testrepo.sh"
|
|
|
|
run pyflakes on all tracked files ending in .py or without a file ending
|
|
(skipping binary file random-seed)
|
|
|
|
$ hg locate 'set:**.py or grep("^#!.*python")' > "$TESTTMP/files1"
|
|
$ if [ -n "$LINTFILES" ]; then
|
|
> printf "$LINTFILES" > "$TESTTMP/files2"
|
|
> join "$TESTTMP/files1" "$TESTTMP/files2"
|
|
> else
|
|
> cat "$TESTTMP/files1"
|
|
> fi \
|
|
> | xargs pyflakes 2>/dev/null | "$RUNTESTDIR/filterpyflakes.py"
|
|
|