tempest/tools/pretty_tox_serial.sh
Matthew Treinish 1ee4398ade Set pipefail for wrapper scripts
Previously if the testr list command was failing subunit2py would
return a 0 making the test runs that use the pretty_tox scripts also
return 0 despite testr actually failing. This commit gets around this
condition by setting pipefail in the pretty_tox scripts to ensure that
we actually fail.

Change-Id: I9cbaf83cfea7c02133b27fe639e7ea12edb48f7e
2013-12-14 10:42:20 -05:00

14 lines
189 B
Bash
Executable File

#!/usr/bin/env bash
set -o pipefail
TESTRARGS=$@
if [ ! -d .testrepository ]; then
testr init
fi
testr run --subunit $TESTRARGS | subunit2pyunit
retval=$?
testr slowest
exit $retval