From 8e34aece1ae0fefae6c982efe2f1ec442bc028ca Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Thu, 23 Feb 2017 17:38:37 +0100 Subject: [PATCH] More usage of ostestr and cleanup an unused dependency Use ostestr as runner instead of the custome pretty_tox.sh script (pretty much removed everywhere). pretty_tox3.sh is just a wrapper for ostestr but it could be probably removed as well going forward. Also remove the tempest-lib dependency, which originally provided subunit-trace (now from os-testr). Change-Id: I4390964ce83167d634b80f696e82a0e199582ce6 --- test-requirements.txt | 1 - tools/pretty_tox.sh | 16 ---------------- tox.ini | 12 ++++++------ 3 files changed, 6 insertions(+), 23 deletions(-) delete mode 100755 tools/pretty_tox.sh diff --git a/test-requirements.txt b/test-requirements.txt index 5271b7005ba5..59ebd11975c1 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -24,7 +24,6 @@ testrepository>=0.0.18 # Apache-2.0/BSD testresources>=0.2.4 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=1.4.0 # MIT -tempest-lib>=0.14.0 # Apache-2.0 bandit>=1.1.0 # Apache-2.0 openstackdocstheme>=1.5.0 # Apache-2.0 gabbi>=1.26.1 # Apache-2.0 diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh deleted file mode 100755 index 799ac1848755..000000000000 --- a/tools/pretty_tox.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/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 diff --git a/tox.ini b/tox.ini index 614461d37d35..36376a636080 100644 --- a/tox.ini +++ b/tox.ini @@ -22,20 +22,20 @@ deps = -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.pyc" -delete passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG GENERATE_HASHES -# there is also secret magic in pretty_tox.sh which lets you run in a fail only +# there is also secret magic in subunit-trace which lets you run in a fail only # mode. To do this define the TRACE_FAILONLY environmental variable. [testenv:py27] commands = {[testenv]commands} - bash tools/pretty_tox.sh '{posargs}' - env TEST_OSPROFILER=1 bash tools/pretty_tox.sh 'nova.tests.unit.test_profiler' + ostestr '{posargs}' + env TEST_OSPROFILER=1 ostestr 'nova.tests.unit.test_profiler' [testenv:py35] commands = {[testenv]commands} bash tools/pretty_tox3.sh '{posargs}' - env TEST_OSPROFILER=1 bash tools/pretty_tox.sh 'nova.tests.unit.test_profiler' + env TEST_OSPROFILER=1 ostestr 'nova.tests.unit.test_profiler' [testenv:pep8] basepython = python2.7 @@ -54,7 +54,7 @@ setenv = VIRTUAL_ENV={envdir} LANGUAGE=en_US commands = find . -type f -name "*.pyc" -delete - bash tools/pretty_tox.sh '{posargs}' + ostestr '{posargs}' # TODO(gcb) Merge this into [testenv:functional] when functional tests are gating # with python 3.5 @@ -77,7 +77,7 @@ setenv = VIRTUAL_ENV={envdir} LANGUAGE=en_US commands = find . -type f -name "*.pyc" -delete - bash tools/pretty_tox.sh '{posargs}' + ostestr '{posargs}' [testenv:genconfig] commands = oslo-config-generator --config-file=etc/nova/nova-config-generator.conf