From 5018ebfdc9df6b4e6dc443a24ff23983e70eb125 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Mon, 19 Nov 2012 15:26:54 -0800 Subject: [PATCH] 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 --- run_tests.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index 205d388dab..41d2bb1865 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -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