mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 17:27:53 +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
31 lines
772 B
Perl
31 lines
772 B
Perl
#require test-repo execbit
|
|
|
|
$ . $TESTDIR/require-core-hg.sh contrib/check-config.py
|
|
|
|
This file is backported from mercurial/tests/test-check-execute.t.
|
|
It differs slightly to fix paths.
|
|
|
|
$ . "$RUNTESTDIR/helpers-testrepo.sh"
|
|
$ cd "$TESTDIR"/..
|
|
$ unset HGRCPATH
|
|
|
|
look for python scripts without the execute bit
|
|
|
|
$ hg files 'set:**.py and not exec() and grep(r"^#!.*?python")'
|
|
[1]
|
|
|
|
look for python scripts with execute bit but not shebang
|
|
|
|
$ hg files 'set:**.py and exec() and not grep(r"^#!.*?python")'
|
|
[1]
|
|
|
|
look for shell scripts with execute bit but not shebang
|
|
|
|
$ hg files 'set:**.sh and exec() and not grep(r"^#!.*(ba)?sh")'
|
|
[1]
|
|
|
|
look for non scripts with no shebang
|
|
|
|
$ hg files 'set:exec() and not **.sh and not **.py and not grep(r"^#!")'
|
|
[1]
|