zun/tools/pretty_tox.sh
Eli Qiao 8348cc5ad1 Make infra ready for unit/pep8/doc testing
Enable unit test frame work first.

Change-Id: I537b769c5c7467206b6ba0d384434d3442462ff0
2016-05-26 19:17:39 +08:00

17 lines
426 B
Bash
Executable File

#!/usr/bin/env bash
set -o pipefail
TESTRARGS=$1
# --until-failure is not compatible with --subunit see:
#
# https://bugs.launchpad.net/testrepository/+bug/1411804
#
# this work around exists until that is addressed
if [[ "$TESTARGS" =~ "until-failure" ]]; then
python setup.py testr --slowest --testr-args="$TESTRARGS"
else
python setup.py testr --slowest --testr-args="--subunit $TESTRARGS" | subunit-trace -f
fi