diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-10-14 10:06:41 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-10-14 10:06:41 +0000 |
commit | a1dba8a4cbbd8bea8826cb979cebc37cdb25f377 (patch) | |
tree | c40a33b91ecc4db870daa19a524b0275fac4706d /run_tests.sh | |
parent | 678a5cb30ac39b7cdf84de09ed8698acf349d448 (diff) | |
parent | 3dbb31b81a85125fd97d96161e087acd5dc364f9 (diff) | |
download | horizon-a1dba8a4cbbd8bea8826cb979cebc37cdb25f377.tar.gz |
Merge "Run flake8 tests automatically on ./run_tests.sh"
Diffstat (limited to 'run_tests.sh')
-rwxr-xr-x | run_tests.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/run_tests.sh b/run_tests.sh index bcd308051..25c068349 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -25,6 +25,7 @@ function usage { echo " --makemessages Update all translation files." echo " --compilemessages Compile all translation files." echo " -p, --pep8 Just run pep8" + echo " -P, --no-pep8 Don't run pep8 by default" echo " -t, --tabs Check for tab characters in files." echo " -y, --pylint Just run pylint" echo " -q, --quiet Run non-interactively. (Relatively) quiet." @@ -60,6 +61,7 @@ command_wrapper="" destroy=0 force=0 just_pep8=0 +no_pep8=0 just_pylint=0 just_docs=0 just_tabs=0 @@ -91,6 +93,7 @@ function process_option { -V|--virtual-env) always_venv=1; never_venv=0;; -N|--no-virtual-env) always_venv=0; never_venv=1;; -p|--pep8) just_pep8=1;; + -P|--no-pep8) no_pep8=1;; -y|--pylint) just_pylint=1;; -f|--force) force=1;; -t|--tabs) just_tabs=1;; @@ -330,12 +333,19 @@ function run_tests_all { # Remove the leftover coverage files from the -p flag earlier. rm -f .coverage.* - if [ $(($HORIZON_RESULT || $DASHBOARD_RESULT)) -eq 0 ]; then + PEP8_RESULT=0 + if [ $no_pep8 -eq 0 ] && [ $only_selenium -eq 0 ]; then + run_pep8 + PEP8_RESULT=$? + fi + + TEST_RESULT=$(($HORIZON_RESULT || $DASHBOARD_RESULT || $PEP8_RESULT)) + if [ $TEST_RESULT -eq 0 ]; then echo "Tests completed successfully." else echo "Tests failed." fi - exit $(($HORIZON_RESULT || $DASHBOARD_RESULT)) + exit $TEST_RESULT } function run_makemessages { |