From 040ff35eeade8a7da0c993713e105d10b1252ae3 Mon Sep 17 00:00:00 2001 From: Paul Glass Date: Thu, 7 Apr 2016 15:11:27 +0000 Subject: [PATCH] Run the functional tests in a more verbose mode Previously, the cli functional tests would not display each test case as they ran. This fixes that, similar to how the api functional tests do this. Change-Id: I899bafa4923dc9c80cad35cdb1f86cbf2e93038d --- tools/pretty_tox.sh | 6 ++++++ tox.ini | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 tools/pretty_tox.sh diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh new file mode 100755 index 0000000..0fc3605 --- /dev/null +++ b/tools/pretty_tox.sh @@ -0,0 +1,6 @@ +#! /bin/sh + +TESTRARGS=$1 + +exec 3>&1 +status=$(exec 4>&1 >&3; ( python setup.py testr --slowest --testr-args="--subunit $TESTRARGS"; echo $? >&4 ) | subunit-trace -f) && exit $status diff --git a/tox.ini b/tox.ini index 0eb2a2b..379f0ad 100644 --- a/tox.ini +++ b/tox.ini @@ -14,10 +14,11 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt whitelist_externals = find + sh commands = find . -type f -name "*.pyc" -delete - python setup.py testr --testr-args='{posargs}' + sh tools/pretty_tox.sh '{posargs}' passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY [testenv:flake8]