From 68c787100ce518a1d142a2b5f17ab2755c2c01c4 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 28 Jul 2016 14:47:27 -0400 Subject: [PATCH] Switch tox to use tempest run and deprecate bash runners This commit switches the tox commands that run tempest to use tempest run instead of pretty_tox.sh. Tempest run is the primary method of running tempest moving forward so we should dogfood it where we can. This also officially starts the deprecation timer (which was long overdue as these were unofficially deprecated before) on the run_tempest.sh and pretty_tox scripts as we move to having a unified method of running things. Partially implements bp tempest-run-cmd Depends-On: I8786b9709584378aaf48393115dda94397e22544 Depends-On: I0529c2922242d8ed9c92ef718328e09f3ea9e05b Depends-On: If0064b9e8358332972ef4a1eee8f150e66f8c50f Depends-On: Ibaffa3a8568ea058d964463df4b76196c4d2bc7a Change-Id: I3684fce66a799579fa68af119652cafef25a9f03 --- run_tempest.sh | 2 ++ tools/pretty_tox.sh | 2 ++ tools/pretty_tox_serial.sh | 2 ++ tox.ini | 12 ++++++------ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/run_tempest.sh b/run_tempest.sh index af01734c95..414146be20 100755 --- a/run_tempest.sh +++ b/run_tempest.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +echo "WARNING: This script is deprecated and will be removed in the near future. Please migrate to tempest run or another method of launching a test runner" + function usage { echo "Usage: $0 [OPTION]..." echo "Run Tempest test suite" diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh index fb4e6d53b2..0b83b9151b 100755 --- a/tools/pretty_tox.sh +++ b/tools/pretty_tox.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +echo "WARNING: This script is deprecated and will be removed in the near future. Please migrate to tempest run or another method of launching a test runner" + set -o pipefail TESTRARGS=$1 diff --git a/tools/pretty_tox_serial.sh b/tools/pretty_tox_serial.sh index e0fca0fbcb..1f8204e34d 100755 --- a/tools/pretty_tox_serial.sh +++ b/tools/pretty_tox_serial.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +echo "WARNING: This script is deprecated and will be removed in the near future. Please migrate to tempest run or another method of launching a test runner" + set -o pipefail TESTRARGS=$@ diff --git a/tox.ini b/tox.ini index a621492963..05fa32600b 100644 --- a/tox.ini +++ b/tox.ini @@ -44,7 +44,7 @@ setenv = deps = {[tempestenv]deps} commands = find . -type f -name "*.pyc" -delete - bash tools/pretty_tox.sh '{posargs}' + tempest run --regex {posargs} [testenv:ostestr] sitepackages = {[tempestenv]sitepackages} @@ -66,7 +66,7 @@ setenv = deps = {[tempestenv]deps} commands = find . -type f -name "*.pyc" -delete - bash tools/pretty_tox.sh '{posargs}' + tempest run --regex {posargs} [testenv:full] envdir = .tox/tempest @@ -77,7 +77,7 @@ deps = {[tempestenv]deps} # See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610 commands = find . -type f -name "*.pyc" -delete - bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)) {posargs}' + tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario))' {posargs} [testenv:full-serial] envdir = .tox/tempest @@ -88,7 +88,7 @@ deps = {[tempestenv]deps} # See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610 commands = find . -type f -name "*.pyc" -delete - bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)) {posargs}' + tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario))' {posargs} [testenv:smoke] envdir = .tox/tempest @@ -97,7 +97,7 @@ setenv = {[tempestenv]setenv} deps = {[tempestenv]deps} commands = find . -type f -name "*.pyc" -delete - bash tools/pretty_tox.sh '\[.*\bsmoke\b.*\] {posargs}' + tempest run --regex '\[.*\bsmoke\b.*\]' {posargs} [testenv:smoke-serial] envdir = .tox/tempest @@ -109,7 +109,7 @@ deps = {[tempestenv]deps} # job would fail if we moved it to parallel. commands = find . -type f -name "*.pyc" -delete - bash tools/pretty_tox_serial.sh '\[.*\bsmoke\b.*\] {posargs}' + tempest run --serial --regex '\[.*\bsmoke\b.*\]' {posargs} [testenv:stress] envdir = .tox/tempest