diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-05-18 20:39:42 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-05-18 20:39:42 +0000 |
| commit | 795656184e2d864c30b8e42d13a12d5021680e8b (patch) | |
| tree | b5bca6204bf97545ee614fc84575aad3a812e0fd | |
| parent | 7a0845ec1127b89073845f07425b17651b005c38 (diff) | |
| parent | 095edbc3678dd9d7cc630becf098f3626fe3237d (diff) | |
| download | python-openstackclient-795656184e2d864c30b8e42d13a12d5021680e8b.tar.gz | |
Merge "Pep8 environment to run on delta code only"
| -rwxr-xr-x | tools/fast8.sh | 15 | ||||
| -rw-r--r-- | tox.ini | 6 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tools/fast8.sh b/tools/fast8.sh new file mode 100755 index 00000000..2b3e22ab --- /dev/null +++ b/tools/fast8.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +cd $(dirname "$0")/.. +CHANGED=$(git diff --name-only HEAD~1 | tr '\n' ' ') + +# Skip files that don't exist +# (have been git rm'd) +CHECK="" +for FILE in $CHANGED; do + if [ -f "$FILE" ]; then + CHECK="$CHECK $FILE" + fi +done + +diff -u --from-file /dev/null $CHECK | flake8 --diff @@ -11,6 +11,12 @@ deps = -r{toxinidir}/test-requirements.txt commands = ostestr {posargs} whitelist_externals = ostestr +[testenv:fast8] +# Use same environment directory as pep8 env to save space and install time +envdir = {toxworkdir}/pep8 +commands = + {toxinidir}/tools/fast8.sh + [testenv:pep8] commands = flake8 |
