From 99bdbe9ca9d528fb9dcbd95d16012c48c0b224b6 Mon Sep 17 00:00:00 2001 From: Sergey Reshetnyak Date: Thu, 15 Jan 2015 18:47:17 +0300 Subject: [PATCH] Use pretty-tox for better test output Change-Id: I4f64832e99c479977c57031cc7961fa5c1a49470 --- test-requirements.txt | 1 + tools/pretty_tox.sh | 6 ++++++ tox.ini | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 tools/pretty_tox.sh diff --git a/test-requirements.txt b/test-requirements.txt index 5218295c..45ea58ac 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -17,6 +17,7 @@ pylint>=1.3.0 # GNU GPL v2 sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 sphinxcontrib-httpdomain sqlalchemy-migrate>=0.9.1,!=0.9.2 +tempest-lib testrepository>=0.0.18 testscenarios>=0.4 testtools>=0.9.36,!=1.2.0 diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh new file mode 100644 index 00000000..ac760458 --- /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 -f diff --git a/tox.ini b/tox.ini index 7ac918b4..7e00b8af 100644 --- a/tox.ini +++ b/tox.ini @@ -12,14 +12,14 @@ setenv = deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = python setup.py test --slowest --testr-args="{posargs}" +commands = bash tools/pretty_tox.sh '{posargs}' whitelist_externals = bash [testenv:integration] setenv = VIRTUAL_ENV={envdir} DISCOVER_DIRECTORY=sahara/tests/integration -commands = python setup.py test --slowest --testr-args="{posargs}" +commands = bash tools/pretty_tox.sh '{posargs}' [testenv:cover] commands = python setup.py testr --coverage --testr-args='{posargs}'