summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Treinish <mtreinish@kortar.org>2014-10-18 01:26:11 -0400
committerMatthew Treinish <mtreinish@kortar.org>2014-12-04 20:59:27 +0000
commitdd266f725de573cd09c9e7bbb3c3ab20d49ec675 (patch)
tree8b48b6086097f796605ad504da82661e80b52510
parent5715fd65142380573c5cb1f0ff4f3996004b3466 (diff)
downloadtempest-lib-dd266f725de573cd09c9e7bbb3c3ab20d49ec675.tar.gz
Add pretty_tox.sh wrapper script to use subunit-trace
This commit adds a pretty_tox.sh wrapper script for the tempest-lib unit tests to use subunit-trace when running the tests. This should make the output a bit more clear and help with future debugging. Change-Id: I48d670353bb85f7f87a05041bed60ad131555057
-rwxr-xr-xtools/pretty_tox.sh6
-rw-r--r--tox.ini3
2 files changed, 8 insertions, 1 deletions
diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh
new file mode 100755
index 0000000..ff554c5
--- /dev/null
+++ b/tools/pretty_tox.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+set -o pipefail
+
+TESTRARGS=$1
+python setup.py testr --slowest --testr-args="--subunit $TESTRARGS" | subunit-trace --no-failure-debug -f
diff --git a/tox.ini b/tox.ini
index 0ea4e95..d2de02c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -6,11 +6,12 @@ skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
+whitelist_externals = bash
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-commands = python setup.py testr --slowest --testr-args='{posargs}'
+commands = bash tools/pretty_tox.sh {posargs}
[testenv:pep8]
commands = flake8