author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
Sat, 04 Mar 2017 02:56:50 +0100 | |
changeset 2044 | d31ad31e456b |
parent 2038 | a4b09789117a |
child 2108 | 206066375dcb |
permissions | -rw-r--r-- |
2038
a4b09789117a
tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2037
diff
changeset
|
1 |
#require test-repo |
a4b09789117a
tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2037
diff
changeset
|
2 |
|
a4b09789117a
tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2037
diff
changeset
|
3 |
$ checkflake8() { |
a4b09789117a
tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2037
diff
changeset
|
4 |
> if ! (which flake8 > /dev/null); then |
a4b09789117a
tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2037
diff
changeset
|
5 |
> echo skipped: missing tool: flake8; |
a4b09789117a
tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2037
diff
changeset
|
6 |
> exit 80; |
a4b09789117a
tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2037
diff
changeset
|
7 |
> fi; |
a4b09789117a
tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2037
diff
changeset
|
8 |
> }; |
a4b09789117a
tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2037
diff
changeset
|
9 |
$ checkflake8 |
1930 | 10 |
|
11 |
Copied from Mercurial core (60ee2593a270) |
|
12 |
||
13 |
$ cd "`dirname "$TESTDIR"`" |
|
14 |
||
2002 | 15 |
run flake8 if it exists; if it doesn't, then just skip |
16 |
||
2038
a4b09789117a
tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2037
diff
changeset
|
17 |
$ type flake8 >/dev/null 2>/dev/null && hg files -0 'glob:**.py' | xargs -0 flake8 |