Add "fast8" tox env

This replicates the run_tests.sh -8 behavior, running
flake8 only on changes made in the last commit and
working tree.

Change-Id: Iebd5746c78e840225f0860843c77f4c638877c26
This commit is contained in:
Eric Harney 2015-09-22 15:43:51 -04:00
parent a882b6d2f3
commit 7e5c074351
2 changed files with 9 additions and 0 deletions

5
tools/fast8.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
cd $(dirname "$0")/..
CHANGED=$(git diff --name-only HEAD~2 | tr '\n' ' ')
diff -u --from-file /dev/null $CHANGED | flake8 --diff

View File

@ -114,6 +114,10 @@ commands =
{toxinidir}/tools/config/check_uptodate.sh
{toxinidir}/tools/check_exec.py {toxinidir}/cinder
[testenv:fast8]
commands =
{toxinidir}/tools/fast8.sh
[testenv:pylint]
deps = -r{toxinidir}/requirements.txt
pylint==0.26.0