summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSean Dague <sean@dague.net>2015-02-23 08:20:44 -0500
committerSean Dague <sean@dague.net>2015-02-23 17:22:10 -0500
commit9a06348f4740a96270955e914c0450c263c932e2 (patch)
tree86e510083ae22ae569f9e893def409095b002520 /tools
parentbe41ae238d05a2c3ade3822d869d2d199444c52a (diff)
downloadpython-novaclient-9a06348f4740a96270955e914c0450c263c932e2.tar.gz
add pretty_tox to nova functional tests
debugging tests is a lot easier when you can actually inject stderr directly through even on successes. Add the pretty tox facility from nova / tempest-lib into python-nova client as well for functional tests. Change-Id: I5c1f8244a5c743b590b74a8eb3eaf4a699555644
Diffstat (limited to 'tools')
-rwxr-xr-xtools/pretty_tox.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh
new file mode 100755
index 00000000..799ac184
--- /dev/null
+++ b/tools/pretty_tox.sh
@@ -0,0 +1,16 @@
+#!/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