Add support for running with a custom regex filter

This commit adds a new env variable, DEVSTACK_GATE_TEMPEST_REGEX to
specify a custom regex filter for running tempest. This will enable
users to specify which tempest tests get run.

Change-Id: Ied8187e06e7dbb6f9878a6081d08d3ee4035950b
This commit is contained in:
Matthew Treinish
2014-03-03 13:21:56 -05:00
parent e9aa963b5e
commit 54d397f49a
2 changed files with 8 additions and 1 deletions

View File

@@ -232,6 +232,9 @@ export DEVSTACK_GATE_TEMPEST_TESTR_FULL=${DEVSTACK_GATE_TEMPEST_TESTR_FULL:-0}
# Set to 1 to run all tempest tests
export DEVSTACK_GATE_TEMPEST_ALL=${DEVSTACK_GATE_TEMPEST_ALL:-0}
# Set to a regex to run tempest with a custom regex filter
export DEVSTACK_GATE_TEMPEST_REGEX=${DEVSTACK_GATE_TEMPEST_REGEX:-""}
# Set to 1 if running the openstack/requirements integration test
export DEVSTACK_GATE_REQS_INTEGRATION=${DEVSTACK_GATE_REQS_INTEGRATION:-0}

View File

@@ -324,7 +324,11 @@ if [ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]; then
set +o errexit
cd $BASE/new/tempest
if [[ "$DEVSTACK_GATE_TEMPEST_ALL" -eq "1" ]]; then
if [[ "$DEVSTACK_GATE_TEMPEST_REGEX" -ne "" ]] ; then
echo "Running tempest with a custom regex filter"
sudo -H -u tempest tox -eall -- --concurrency=$TEMPEST_CONCURRENCY $DEVSTACK_GATE_TEMPEST_REGEX
res=$?
elif [[ "$DEVSTACK_GATE_TEMPEST_ALL" -eq "1" ]]; then
echo "Running tempest all test suite"
sudo -H -u tempest tox -eall -- --concurrency=$TEMPEST_CONCURRENCY
res=$?