From 2a74120b73fd889930421a0a67855c73750a6752 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Wed, 25 Sep 2019 15:47:59 +0100 Subject: [PATCH] tox: Use common 'command' definition for unit tests Less LoC. Winning. Change-Id: Icc1531d18ea1e0692c41320a98100bba92d7b48a Signed-off-by: Stephen Finucane --- tox.ini | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/tox.ini b/tox.ini index ee093c184d..c3c240b11b 100644 --- a/tox.ini +++ b/tox.ini @@ -31,22 +31,15 @@ passenv = OS_DEBUG GENERATE_HASHES # 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. +commands = + stestr run {posargs} + env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler' [testenv:py27] commands = - stestr run {posargs} - env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler' + {[testenv]commands} stestr slowest -[testenv:py36] -commands = - stestr run {posargs} - env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler' - -[testenv:py37] -commands = - {[testenv:py36]commands} - [testenv:pep8] description = Run style checks. @@ -285,5 +278,3 @@ deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt -commands = - stestr run {posargs}