2018-02-01 03:47:34 +03:00
|
|
|
#require test-repo hg10 slow
|
2016-04-06 22:09:12 +03:00
|
|
|
|
2016-05-11 07:49:27 +03:00
|
|
|
$ . "$TESTDIR/helpers-testrepo.sh"
|
2016-04-06 22:09:12 +03:00
|
|
|
$ cd "`dirname "$TESTDIR"`"
|
|
|
|
|
|
|
|
look for python scripts that do not use /usr/bin/env
|
|
|
|
|
2018-01-25 03:13:11 +03:00
|
|
|
$ testrepohg files 'set:** and grep(r"^#!.*?python") and not grep(r"^#!/usr/bi{1}n/env python") - **/*.t'
|
2018-01-11 00:27:59 +03:00
|
|
|
fb/facebook-hg-rpms/sctrigger.py
|
|
|
|
fb/facebook-hg-rpms/vendorcrates.py
|
2016-04-06 22:09:12 +03:00
|
|
|
|
2017-06-15 21:22:39 +03:00
|
|
|
In tests, enforce $PYTHON and *not* /usr/bin/env python or similar:
|
2018-01-25 03:13:11 +03:00
|
|
|
$ testrepohg files 'set:**/*.t and grep(r"#!.*?python")' \
|
2017-06-15 21:22:39 +03:00
|
|
|
> -X tests/test-check-execute.t \
|
|
|
|
> -X tests/test-check-module-imports.t \
|
|
|
|
> -X tests/test-check-pyflakes.t \
|
2018-01-03 20:46:16 +03:00
|
|
|
> -X tests/test-check-shbang.t \
|
2018-01-08 22:17:58 +03:00
|
|
|
> -X fb-hgext/tests/test-fb-hgext-check-execute-hg.t \
|
|
|
|
> -X fb-hgext/tests/test-fb-hgext-check-pyflakes-hg.t \
|
|
|
|
> -X fb-hgext/tests/test-fb-hgext-check-shbang-hg.t
|
2017-06-15 21:22:39 +03:00
|
|
|
[1]
|
|
|
|
|
|
|
|
The above exclusions are because they're looking for files that
|
|
|
|
contain Python but don't end in .py - please avoid adding more.
|
|
|
|
|
2016-04-06 22:09:12 +03:00
|
|
|
look for shell scripts that do not use /bin/sh
|
|
|
|
|
2018-01-25 03:13:11 +03:00
|
|
|
$ testrepohg files 'set:** and grep(r"^#!.*/bi{1}n/sh") and not grep(r"^#!/bi{1}n/sh")'
|
2016-04-06 22:09:12 +03:00
|
|
|
[1]
|