mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
0dab1ab662
Summary: All of the test-check*.t tests cd out of the test repository and into the main normal fb-hgext repository, and attempt to run hg commands there to examine the repository contents. Unfortunately they were doing so still using the HGRCPATH settings configured for the test repository. In practice this causes the tests in many situations, because extensions enabled in the system configuration and required for the main repository may not have been enabled. Test Plan: Ran "arc unit" in a repository with sqldirstate enabled and confirmed the tests pass now instead of bombing out with screenfuls of error messages. Reviewers: #sourcecontrol, stash, durham, rmcelroy Reviewed By: rmcelroy Subscribers: rmcelroy, net-systems-diffs@, yogeshwer, mjpieters Differential Revision: https://phabricator.intern.facebook.com/D4427670 Signature: t1:4427670:1484733701:f6c859c29d34eb33b1280e798ab3398a03a3a461
24 lines
697 B
Perl
24 lines
697 B
Perl
#require test-repo pyflakes hg10
|
|
|
|
$ . $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.
|
|
|
|
$ . "$RUNTESTDIR/helpers-testrepo.sh"
|
|
$ cd "$TESTDIR"/..
|
|
$ unset HGRCPATH
|
|
|
|
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"
|
|
|