Allow for not running pep8.
Its not always wanted to run pep8 so we should have a flag that can be used to disable it so that people who do not want to run it can accomplish this. Fixes: bug 1080907 Change-Id: I7f9dedbc7eca8421e0acf58e478c105f8b8de0c9
This commit is contained in:
parent
f3118e922f
commit
5018ebfdc9
@ -9,6 +9,7 @@ function usage {
|
||||
echo " -f, --force Force a clean re-build of the virtual environment. Useful when dependencies have been added."
|
||||
echo " --unittests-only Run unit tests only, exclude functional tests."
|
||||
echo " -p, --pep8 Just run pep8"
|
||||
echo " -P, --no-pep8 Don't run static code checks"
|
||||
echo " -h, --help Print this usage message"
|
||||
echo ""
|
||||
echo "Note: with no options specified, the script will try to run the tests in a virtual environment,"
|
||||
@ -23,6 +24,7 @@ function process_option {
|
||||
-V|--virtual-env) let always_venv=1; let never_venv=0;;
|
||||
-N|--no-virtual-env) let always_venv=0; let never_venv=1;;
|
||||
-p|--pep8) let just_pep8=1;;
|
||||
-P|--no-pep8) let no_pep8=1;;
|
||||
-f|--force) let force=1;;
|
||||
--unittests-only) noseopts="$noseopts --exclude-dir=glance/tests/functional";;
|
||||
-c|--coverage) noseopts="$noseopts --with-coverage --cover-package=glance";;
|
||||
@ -40,6 +42,7 @@ noseopts=
|
||||
noseargs=
|
||||
wrapper=""
|
||||
just_pep8=0
|
||||
no_pep8=0
|
||||
|
||||
export NOSE_WITH_OPENSTACK=1
|
||||
export NOSE_OPENSTACK_COLOR=1
|
||||
@ -105,5 +108,7 @@ fi
|
||||
run_tests || exit
|
||||
|
||||
if [ -z "$noseargs" ]; then
|
||||
run_pep8
|
||||
if [ $no_pep8 -eq 0 ]; then
|
||||
run_pep8
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user