From c9b245bb438cdfe1155a86986e3fe2eb83f6f328 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Tue, 10 Feb 2015 14:32:39 -0800 Subject: [PATCH] Optionally install tempest and disable by default In I78d51f04ed01da4ce8aa0e127be028f969d3b4f8 we turned off installing tempest because we install it on stable branches where the stable reqs do not equal the tempest master (branchless) reqs. Leave this off by default since that is the behaviour we have in the gate, and make default devstack as similar to the gate as possible. But add an option to install tempest by default so developers can opt and reproduce the previous behaviour. Update the tempest section of the README with how to run tempest tests and how to install tempest if desired. Change-Id: Ie4ea7335a57917244873ec54658ca269ab765ce1 --- README.md | 10 +++++++++- lib/tempest | 14 ++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 40060a7cf5..28f4c90cda 100644 --- a/README.md +++ b/README.md @@ -282,7 +282,15 @@ If tempest has been successfully configured, a basic set of smoke tests can be run as follows: $ cd /opt/stack/tempest - $ nosetests tempest/scenario/test_network_basic_ops.py + $ tox -efull tempest.scenario.test_network_basic_ops + +By default tempest is downloaded and the config file is generated, but the +tempest package is not installed in the system's global site-packages (the +package install includes installing dependences). So tempest won't run +outside of tox. If you would like to install it add the following to your +``localrc`` section: + + INSTALL_TEMPEST=True # DevStack on Xenserver diff --git a/lib/tempest b/lib/tempest index d3b40aa361..258bb374ee 100644 --- a/lib/tempest +++ b/lib/tempest @@ -63,6 +63,12 @@ BUILD_INTERVAL=1 BUILD_TIMEOUT=${BUILD_TIMEOUT:-196} +# This must be False on stable branches, as master tempest +# deps do not match stable branch deps. Set this to True to +# have tempest installed in devstack by default. +INSTALL_TEMPEST=${INSTALL_TEMPEST:-"False"} + + BOTO_MATERIALS_PATH="$FILES/images/s3-materials/cirros-${CIRROS_VERSION}" BOTO_CONF=/etc/boto.cfg @@ -94,8 +100,12 @@ function remove_disabled_extensions { # configure_tempest() - Set config files, create data dirs, etc function configure_tempest { - # install testr since its used to process tempest logs - pip_install $(get_from_global_requirements testrepository) + if [[ "$INSTALL_TEMPEST" == "True" ]]; then + setup_develop $TEMPEST_DIR + else + # install testr since its used to process tempest logs + pip_install $(get_from_global_requirements testrepository) + fi local image_lines local images