summaryrefslogtreecommitdiff
path: root/tools/pretty_tox.sh
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2015-02-21 20:37:13 -0800
committerJoshua Harlow <harlowja@gmail.com>2015-02-21 20:37:13 -0800
commit1267a2a04d089f4d9e89297e60376c285042d460 (patch)
treee3afe9dea7480a67028f27b732ba6fc43471f2e6 /tools/pretty_tox.sh
parent8074c6a50fb0b5fa6e623d1950f0a64ef3027c15 (diff)
downloadtaskflow-1267a2a04d089f4d9e89297e60376c285042d460.tar.gz
Bring over pretty_tox.sh from nova/heat/others
Change-Id: Ie0373a30b6416eda26b9666c572f8c47089f7219
Diffstat (limited to 'tools/pretty_tox.sh')
-rwxr-xr-xtools/pretty_tox.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh
new file mode 100755
index 0000000..5847e4e
--- /dev/null
+++ b/tools/pretty_tox.sh
@@ -0,0 +1,17 @@
+#!/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" | $(dirname $0)/subunit_trace.py -f
+fi
+