diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-01-21 08:36:45 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-01-21 08:36:45 +0000 |
commit | 8e0118fc0f8f4059974467b4a30c89f38109a80f (patch) | |
tree | 730d2775a16f1039707568c82b6d25274a64798d | |
parent | b40fca65a4d19b805c58ad555477d2290b4f2269 (diff) | |
parent | e0b24f96096e8f674a2ffe30f7c85a42c191a595 (diff) | |
download | keystone-8e0118fc0f8f4059974467b4a30c89f38109a80f.tar.gz |
Merge "Adds run_tests.sh cli option to stop on failure"
-rwxr-xr-x | run_tests.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/run_tests.sh b/run_tests.sh index e33cf3aab..f2086d519 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -42,6 +42,7 @@ function process_option { -h|--help) usage;; -V|--virtual-env) always_venv=1; never_venv=0;; -N|--no-virtual-env) always_venv=0; never_venv=1;; + -x|--stop) failfast=1;; -f|--force) force=1;; -u|--update) update=1;; -p|--pep8) just_flake8=1;; @@ -58,6 +59,7 @@ with_venv=tools/with_venv.sh always_venv=0 never_venv=0 force=0 +failfast=0 testrargs= testropts=--subunit wrapper="" @@ -81,6 +83,9 @@ fi function run_tests { set -e echo ${wrapper} + if [ $failfast -eq 1 ]; then + testrargs="$testrargs -- --failfast" + fi ${wrapper} $TESTRTESTS --testr-args="$testropts $testrargs" | \ ${wrapper} subunit-2to1 | \ ${wrapper} tools/colorizer.py |