diff options
author | Dirk Mueller <dirk@dmllr.de> | 2013-02-11 18:01:27 +0100 |
---|---|---|
committer | Dirk Mueller <dirk@dmllr.de> | 2013-02-11 18:05:10 +0100 |
commit | 84b7969b72af218f948078eb8ee46a97783f24de (patch) | |
tree | b48a52f2b1e0f9369e0846c161822b1dccd92378 /run_tests.sh | |
parent | bcaf6c4d9327a221091302fea807860ae538994c (diff) | |
download | python-heatclient-84b7969b72af218f948078eb8ee46a97783f24de.tar.gz |
Return the exit code from tox to callers of run_tests.sh
Invoking PIPESTATUS appears to be volatile in my environment,
after the if condition it is already again 0, even if it was
non-zero before. Capture the result permanently in a variable
and use that one consistently.
Also handle the just-pep8 case correctly.
Change-Id: Icca8c00c8d2189da1a133db277c9071c2d6c880b
Diffstat (limited to 'run_tests.sh')
-rwxr-xr-x | run_tests.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/run_tests.sh b/run_tests.sh index 6bee805..d2e18e8 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -35,13 +35,13 @@ for arg in "$@"; do done if [ $just_pep8 -eq 1 ]; then - tox -e pep8 - exit + exec tox -e pep8 fi -tox -e py27 $toxargs 2>&1 | tee run_tests.err.log || exit -if [ ${PIPESTATUS[0]} -ne 0 ]; then - exit ${PIPESTATUS[0]} +tox -e py27 $toxargs 2>&1 | tee run_tests.err.log || exit 1 +tox_exit_code=${PIPESTATUS[0]} +if [ 0$tox_exit_code -ne 0 ]; then + exit $tox_exit_code fi if [ -z "$toxargs" ]; then |