Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Add a tempestrunrc for configuring run-tempest
Browse files Browse the repository at this point in the history
Add a tempestrunrc file which is sourced by run-tempest
to get input settings such as image-name and concurrency.

Variables in tempestrunrc can be via the ExtraConfig of
the image where the element is deployed.

Change-Id: I24b04b22e911732ffb9884a15cc45afabc02100a
  • Loading branch information
afrittoli committed Dec 22, 2014
1 parent 9a81006 commit d4e676e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
5 changes: 4 additions & 1 deletion elements/tempest/README.md
Expand Up @@ -10,7 +10,10 @@ To successfully run tempest your overcloud should have
To use you should simply run the command run-tempest with the
OS_* environment variables for admin defined.

Tempest configuration may be overwritten via pass-through.
tempest-run configuration is defined in etc/tempestrunrc; values in there
may be overwritten using ExtraConfig.

TODO:
* Remove as many of the filters in tests2skip.txt as possible
* Investigate setting allow_tenant_isolation to true
* Investigate setting run_ssh to true
12 changes: 9 additions & 3 deletions elements/tempest/bin/run-tempest
Expand Up @@ -18,9 +18,15 @@
set -eux
set -o pipefail

# Setup the environment
TEMPEST_RUN_CONCURRENCY=${TEMPEST_RUN_CONCURRENCY:-0}
TEMPEST_IMAGE_NAME=${TEMPEST_IMAGE_NAME:-user}
function check_environment {
# Check the environment to fail nicely if something is missing
TEMPEST_RUN_CONCURRENCY=${TEMPEST_RUN_CONCURRENCY:?"TEMPEST_RUN_CONCURRENCY must be defined"}
TEMPEST_IMAGE_NAME=${TEMPEST_IMAGE_NAME:?"TEMPEST_IMAGE_NAME must be defined"}
}

# Setup the environment. tempestrunrc file must exist, if not we fail
source /etc/tempestrunrc
check_environment

cd /opt/stack/tempest

Expand Down
16 changes: 16 additions & 0 deletions elements/tempest/os-apply-config/etc/tempestrunrc
@@ -0,0 +1,16 @@
{{#tempestrun.concurrency}}
# Number of test processes spawned by testr
TEMPEST_RUN_CONCURRENCY={{tempestrun.concurrency}}
{{/tempestrun.concurrency}}
{{^tempestrun.concurrency}}
# Number of test processes spawned by testr
TEMPEST_RUN_CONCURRENCY=0
{{/tempestrun.concurrency}}
{{#tempestrun.image}}
# Name of the test image to be used
TEMPEST_IMAGE_NAME={{tempestrun.image}}
{{/tempestrun.image}}
{{^tempestrun.image}}
# Name of the test image to be used
TEMPEST_IMAGE_NAME=user
{{/tempestrun.image}}

0 comments on commit d4e676e

Please sign in to comment.