magnum/tools/pretty_tox.sh
Eli Qiao d802877e6e Improve tox.ini to easy developer's life
This patch is mainly porting from nova repository:

Adds:
1.tools/flake8wrap.sh
  Will let developer use 'tox -epep8 -- -HEAD' to testing changes files
2.tools/pretty_tox.sh
  Give pretty test trace when doing unit/functional testing.

Change-Id: Icedb4ed8b50532531e18784a1584fe63c5a9e017
2015-11-03 17:44:38 +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