blob: 4787612354e6526dc4f946a752e21798d6110379 [file] [log] [blame]
Sean Daguee263c822014-12-05 14:25:28 -05001#!/bin/bash
2#
Sean Dagued0931212012-10-04 16:06:44 -04003# lib/tempest
Dean Troyer6d04fd72012-12-21 11:03:37 -06004# Install and configure Tempest
Sean Dagued0931212012-10-04 16:06:44 -04005
6# Dependencies:
Adam Spiers6a5aa7c2013-10-24 11:27:02 +01007#
8# - ``functions`` file
9# - ``lib/nova`` service is running
10# - Global vars that are assumed to be defined:
11# - ``DEST``, ``FILES``
12# - ``ADMIN_PASSWORD``
13# - ``DEFAULT_IMAGE_NAME``
14# - ``S3_SERVICE_PORT``
15# - ``SERVICE_HOST``
16# - ``BASE_SQL_CONN`` ``lib/database`` declares
17# - ``PUBLIC_NETWORK_NAME``
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010018# - ``Q_ROUTER_NAME``
Tomoe Sugiharaafbc6312013-11-14 20:02:47 +000019# - ``Q_L3_ENABLED``
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010020# - ``VIRT_DRIVER``
21# - ``LIBVIRT_TYPE``
22# - ``KEYSTONE_SERVICE_PROTOCOL``, ``KEYSTONE_SERVICE_HOST`` from lib/keystone
23#
Attila Fazekas2aa35172012-12-05 20:03:40 +010024# Optional Dependencies:
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010025#
Einst Crazyf54f60a2015-10-30 23:00:57 +080026# - ``ALT_*``
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010027# - ``LIVE_MIGRATION_AVAILABLE``
28# - ``USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION``
29# - ``DEFAULT_INSTANCE_TYPE``
30# - ``DEFAULT_INSTANCE_USER``
Swapnil Kulkarni09fb7ba2014-10-16 06:30:28 +000031# - ``CINDER_ENABLED_BACKENDS``
Matt Riedemann89ee5852015-07-09 13:25:04 -070032# - ``NOVA_ALLOW_DUPLICATE_NETWORKS``
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010033#
Sean Dagued0931212012-10-04 16:06:44 -040034# ``stack.sh`` calls the entry points in this order:
35#
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010036# - install_tempest
37# - configure_tempest
Sean Dagued0931212012-10-04 16:06:44 -040038
39# Save trace setting
Ian Wienand523f4882015-10-13 11:03:03 +110040_XTRACE_TEMPEST=$(set +o | grep xtrace)
Sean Dagued0931212012-10-04 16:06:44 -040041set +o xtrace
42
Dean Troyer6d04fd72012-12-21 11:03:37 -060043
Sean Dagued0931212012-10-04 16:06:44 -040044# Defaults
45# --------
46
Sean Dagued0931212012-10-04 16:06:44 -040047# Set up default directories
48TEMPEST_DIR=$DEST/tempest
john-griffithdc4dc7f2014-01-22 18:09:32 -070049TEMPEST_CONFIG_DIR=${TEMPEST_CONFIG_DIR:-$TEMPEST_DIR/etc}
50TEMPEST_CONFIG=$TEMPEST_CONFIG_DIR/tempest.conf
Matthew Treinish14ccba02013-07-29 16:15:53 -040051TEMPEST_STATE_PATH=${TEMPEST_STATE_PATH:=$DATA_DIR/tempest}
Attila Fazekas2aa35172012-12-05 20:03:40 +010052
Dean Troyer6d04fd72012-12-21 11:03:37 -060053NOVA_SOURCE_DIR=$DEST/nova
54
Attila Fazekasbae02332013-05-09 09:24:49 +020055BUILD_INTERVAL=1
Arx Cruz1bde9b42014-07-18 11:34:33 -030056
57# This is the timeout that tempest will wait for a VM to change state,
58# spawn, delete, etc.
59# The default is set to 196 seconds.
60BUILD_TIMEOUT=${BUILD_TIMEOUT:-196}
Sean Dagued0931212012-10-04 16:06:44 -040061
Joe Gordonc9b245b2015-02-10 14:32:39 -080062# This must be False on stable branches, as master tempest
63# deps do not match stable branch deps. Set this to True to
Dean Troyerdc97cb72015-03-28 08:20:50 -050064# have tempest installed in DevStack by default.
Matthew Treinishcb3cece2015-03-16 10:37:51 -040065INSTALL_TEMPEST=${INSTALL_TEMPEST:-"True"}
Joe Gordonc9b245b2015-02-10 14:32:39 -080066
john-griffithdc4dc7f2014-01-22 18:09:32 -070067# Cinder/Volume variables
68TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default}
Eric Harney01456482014-10-14 18:53:53 -040069TEMPEST_DEFAULT_VOLUME_VENDOR="Open Source"
70TEMPEST_VOLUME_VENDOR=${TEMPEST_VOLUME_VENDOR:-$TEMPEST_DEFAULT_VOLUME_VENDOR}
71TEMPEST_DEFAULT_STORAGE_PROTOCOL="iSCSI"
72TEMPEST_STORAGE_PROTOCOL=${TEMPEST_STORAGE_PROTOCOL:-$TEMPEST_DEFAULT_STORAGE_PROTOCOL}
Dean Troyercc6b4432013-04-08 15:38:03 -050073
armando-migliaccio71ef61a2014-02-19 22:19:24 -080074# Neutron/Network variables
Sean Dague53753292014-12-04 19:38:15 -050075IPV6_ENABLED=$(trueorfalse True IPV6_ENABLED)
76IPV6_SUBNET_ATTRIBUTES_ENABLED=$(trueorfalse True IPV6_SUBNET_ATTRIBUTES_ENABLED)
armando-migliaccio71ef61a2014-02-19 22:19:24 -080077
Matthew Treinishdf8f43b2015-08-09 20:30:39 -040078# Do we want to make a configuration where Tempest has admin on
79# the cloud. We don't always want to so that we can ensure Tempest
80# would work on a public cloud.
81TEMPEST_HAS_ADMIN=$(trueorfalse True TEMPEST_HAS_ADMIN)
82
83# Credential provider configuration option variables
84TEMPEST_ALLOW_TENANT_ISOLATION=${TEMPEST_ALLOW_TENANT_ISOLATION:-$TEMPEST_HAS_ADMIN}
Matthew Treinish403fbb12015-08-24 21:17:37 -040085TEMPEST_USE_TEST_ACCOUNTS=$(trueorfalse False TEMPEST_USE_TEST_ACCOUNTS)
Matthew Treinishdf8f43b2015-08-09 20:30:39 -040086
87# The number of workers tempest is expected to be run with. This is used for
88# generating a accounts.yaml for running with test-accounts. This is also the
89# same variable that devstack-gate uses to specify the number of workers that
90# it will run tempest with
91TEMPEST_CONCURRENCY=${TEMPEST_CONCURRENCY:-$(nproc)}
92
Dean Troyerdc97cb72015-03-28 08:20:50 -050093
Dean Troyercc6b4432013-04-08 15:38:03 -050094# Functions
95# ---------
Sean Dagued0931212012-10-04 16:06:44 -040096
Salvatore33e8ee22014-10-05 01:36:34 +020097# remove_disabled_extension - removes disabled extensions from the list of extensions
98# to test for a given service
99function remove_disabled_extensions {
100 local extensions_list=$1
101 shift
102 local disabled_exts=$*
fumihiko kakuma8606c982015-04-13 09:55:06 +0900103 remove_disabled_services "$extensions_list" "$disabled_exts"
Salvatore33e8ee22014-10-05 01:36:34 +0200104}
105
Sean Dagued0931212012-10-04 16:06:44 -0400106# configure_tempest() - Set config files, create data dirs, etc
Ian Wienandaee18c72014-02-21 15:35:08 +1100107function configure_tempest {
Joe Gordonc9b245b2015-02-10 14:32:39 -0800108 if [[ "$INSTALL_TEMPEST" == "True" ]]; then
109 setup_develop $TEMPEST_DIR
110 else
111 # install testr since its used to process tempest logs
Sean Dague60996b12015-04-08 09:06:49 -0400112 pip_install_gr testrepository
Joe Gordonc9b245b2015-02-10 14:32:39 -0800113 fi
Joe Gordond5ac7852015-02-06 19:29:23 -0800114
Attila Fazekas65c08462012-12-07 14:20:51 +0100115 local image_lines
116 local images
117 local num_images
118 local image_uuid
119 local image_uuid_alt
Attila Fazekas65c08462012-12-07 14:20:51 +0100120 local password
121 local line
122 local flavors
Clark Boylan3b80bde2013-11-20 17:51:50 -0800123 local available_flavors
Attila Fazekas65c08462012-12-07 14:20:51 +0100124 local flavors_ref
125 local flavor_lines
Maru Newbya5c774e2012-12-10 10:40:01 +0000126 local public_network_id
Maru Newby31c94ab2012-12-19 03:59:20 +0000127 local public_router_id
Sean Dague5544c4a2016-01-25 08:27:06 -0500128 local ssh_connect_method="floating"
Attila Fazekas2aa35172012-12-05 20:03:40 +0100129
Dean Troyer6d04fd72012-12-21 11:03:37 -0600130 # Save IFS
Attila Fazekas2aa35172012-12-05 20:03:40 +0100131 ifs=$IFS
132
133 # Glance should already contain images to be used in tempest
134 # testing. Here we simply look for images stored in Glance
135 # and set the appropriate variables for use in the tempest config
136 # We ignore ramdisk and kernel images, look for the default image
Attila Fazekas65c08462012-12-07 14:20:51 +0100137 # ``DEFAULT_IMAGE_NAME``. If not found, we set the ``image_uuid`` to the
138 # first image returned and set ``image_uuid_alt`` to the second,
Attila Fazekas2aa35172012-12-05 20:03:40 +0100139 # if there is more than one returned...
140 # ... Also ensure we only take active images, so we don't get snapshots in process
Cody A.W. Somervillec24e23b2012-12-21 02:10:45 -0500141 declare -a images
142
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200143 if is_service_enabled glance; then
144 while read -r IMAGE_NAME IMAGE_UUID; do
145 if [ "$IMAGE_NAME" = "$DEFAULT_IMAGE_NAME" ]; then
146 image_uuid="$IMAGE_UUID"
147 image_uuid_alt="$IMAGE_UUID"
148 fi
149 images+=($IMAGE_UUID)
Swapnil Kulkarnia747cd22015-05-13 09:26:15 +0000150 done < <(openstack image list --property status=active | awk -F'|' '!/^(+--)|ID|aki|ari/ { print $3,$2 }')
Cody A.W. Somervillec24e23b2012-12-21 02:10:45 -0500151
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200152 case "${#images[*]}" in
153 0)
154 echo "Found no valid images to use!"
155 exit 1
156 ;;
157 1)
158 if [ -z "$image_uuid" ]; then
159 image_uuid=${images[0]}
160 image_uuid_alt=${images[0]}
161 fi
162 ;;
163 *)
164 if [ -z "$image_uuid" ]; then
165 image_uuid=${images[0]}
166 image_uuid_alt=${images[1]}
167 fi
168 ;;
169 esac
170 fi
Attila Fazekas2aa35172012-12-05 20:03:40 +0100171
Matthew Treinish93c10572015-07-31 10:38:50 -0400172 # (Re)create ``tempest.conf``
173 # Create every time because the image UUIDS are going to change
Dean Troyer8421c2b2015-03-16 13:52:19 -0500174 sudo install -d -o $STACK_USER $TEMPEST_CONFIG_DIR
Matthew Treinish93c10572015-07-31 10:38:50 -0400175 rm -f $TEMPEST_CONFIG
Attila Fazekas2aa35172012-12-05 20:03:40 +0100176
Balagopal7ed812c2016-03-01 04:43:31 +0000177 local password=${ADMIN_PASSWORD:-secret}
Attila Fazekas2aa35172012-12-05 20:03:40 +0100178
Dean Troyerdc97cb72015-03-28 08:20:50 -0500179 # See ``lib/keystone`` where these users and tenants are set up
Sean Dague0f765352016-02-18 06:53:08 -0500180 local admin_username=${ADMIN_USERNAME:-admin}
Sean Dague76392b52016-04-04 09:07:08 -0400181 local admin_project_name=${ADMIN_TENANT_NAME:-admin}
Sean Dague0f765352016-02-18 06:53:08 -0500182 local admin_domain_name=${ADMIN_DOMAIN_NAME:-Default}
Sean Dague0f765352016-02-18 06:53:08 -0500183 local alt_username=${ALT_USERNAME:-alt_demo}
Sean Dague76392b52016-04-04 09:07:08 -0400184 local alt_project_name=${ALT_TENANT_NAME:-alt_demo}
185 local admin_project_id
186 admin_project_id=$(openstack project list | awk "/ admin / { print \$2 }")
Attila Fazekas2aa35172012-12-05 20:03:40 +0100187
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200188 if is_service_enabled nova; then
Dean Troyerdc97cb72015-03-28 08:20:50 -0500189 # If ``DEFAULT_INSTANCE_TYPE`` is not declared, use the new behavior
190 # Tempest creates its own instance types
Rafael Folco0b4c83a2015-11-26 10:08:36 -0600191 available_flavors=$(nova flavor-list)
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200192 if [[ -z "$DEFAULT_INSTANCE_TYPE" ]]; then
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200193 if [[ ! ( $available_flavors =~ 'm1.nano' ) ]]; then
Rafael Folcof0131e12015-09-23 12:55:02 -0500194 nova flavor-create m1.nano 42 64 0 1
Rafael Folcoba0f1d32013-12-06 17:56:24 -0200195 fi
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200196 flavor_ref=42
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200197 if [[ ! ( $available_flavors =~ 'm1.micro' ) ]]; then
Rafael Folcof0131e12015-09-23 12:55:02 -0500198 nova flavor-create m1.micro 84 128 0 1
Rafael Folcoba0f1d32013-12-06 17:56:24 -0200199 fi
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200200 flavor_ref_alt=84
201 else
Dean Troyerdc97cb72015-03-28 08:20:50 -0500202 # Check Nova for existing flavors, if ``DEFAULT_INSTANCE_TYPE`` is set use it.
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200203 IFS=$'\r\n'
204 flavors=""
Rafael Folco0b4c83a2015-11-26 10:08:36 -0600205 for line in $available_flavors; do
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200206 f=$(echo $line | awk "/ $DEFAULT_INSTANCE_TYPE / { print \$2 }")
207 flavors="$flavors $f"
208 done
Attila Fazekas2aa35172012-12-05 20:03:40 +0100209
Rafael Folco0b4c83a2015-11-26 10:08:36 -0600210 for line in $available_flavors; do
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200211 flavors="$flavors `echo $line | grep -v "^\(|\s*ID\|+--\)" | cut -d' ' -f2`"
212 done
Attila Fazekas7bf1dd32013-01-12 17:31:26 +0100213
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200214 IFS=" "
215 flavors=($flavors)
216 num_flavors=${#flavors[*]}
217 echo "Found $num_flavors flavors"
218 if [[ $num_flavors -eq 0 ]]; then
219 echo "Found no valid flavors to use!"
220 exit 1
Adalberto Medeiros63a71a22013-06-06 08:46:04 -0400221 fi
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200222 flavor_ref=${flavors[0]}
223 flavor_ref_alt=$flavor_ref
224
Dean Troyerdc97cb72015-03-28 08:20:50 -0500225 # Ensure ``flavor_ref`` and ``flavor_ref_alt`` have different values.
226 # Some resize instance in tempest tests depends on this.
Attila Fazekasc411fcf2014-08-19 16:48:14 +0200227 for f in ${flavors[@]:1}; do
228 if [[ $f -ne $flavor_ref ]]; then
229 flavor_ref_alt=$f
230 break
231 fi
232 done
233 fi
Attila Fazekas2aa35172012-12-05 20:03:40 +0100234 fi
235
Attila Fazekas386ae8c2013-10-21 09:27:18 +0200236 ssh_connect_method=${TEMPEST_SSH_CONNECT_METHOD:-$ssh_connect_method}
237
Tomoe Sugiharaafbc6312013-11-14 20:02:47 +0000238 if [ "$Q_L3_ENABLED" = "True" ]; then
Mark McClainb05c8762013-07-06 23:29:39 -0400239 public_network_id=$(neutron net-list | grep $PUBLIC_NETWORK_NAME | \
Maru Newbya5c774e2012-12-10 10:40:01 +0000240 awk '{print $2}')
241 fi
242
Masayuki Igawa5a252d92014-11-21 21:55:09 +0900243 iniset $TEMPEST_CONFIG DEFAULT use_syslog $SYSLOG
Dean Troyerdc97cb72015-03-28 08:20:50 -0500244
Matthew Treinish859cc682013-07-26 15:22:44 -0400245 # Oslo
Joe Gordon23d6d502015-03-06 15:24:22 -0800246 iniset $TEMPEST_CONFIG oslo_concurrency lock_path $TEMPEST_STATE_PATH
Matthew Treinish14ccba02013-07-29 16:15:53 -0400247 mkdir -p $TEMPEST_STATE_PATH
john-griffithdc4dc7f2014-01-22 18:09:32 -0700248 iniset $TEMPEST_CONFIG DEFAULT use_stderr False
249 iniset $TEMPEST_CONFIG DEFAULT log_file tempest.log
250 iniset $TEMPEST_CONFIG DEFAULT debug True
Matthew Treinish859cc682013-07-26 15:22:44 -0400251
Attila Fazekas2aa35172012-12-05 20:03:40 +0100252 # Timeouts
john-griffithdc4dc7f2014-01-22 18:09:32 -0700253 iniset $TEMPEST_CONFIG compute build_timeout $BUILD_TIMEOUT
254 iniset $TEMPEST_CONFIG volume build_timeout $BUILD_TIMEOUT
Attila Fazekas2aa35172012-12-05 20:03:40 +0100255
Attila Fazekas97d3d202013-01-19 19:20:49 +0100256 # Identity
john-griffithdc4dc7f2014-01-22 18:09:32 -0700257 iniset $TEMPEST_CONFIG identity uri "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:5000/v2.0/"
Steve Martinellib74e01c2014-12-18 01:35:35 -0500258 iniset $TEMPEST_CONFIG identity uri_v3 "$KEYSTONE_SERVICE_URI_V3"
Matthew Treinish7ced1502015-03-23 15:51:54 -0400259 if [[ "$TEMPEST_HAS_ADMIN" == "True" ]]; then
Sean Dague0f765352016-02-18 06:53:08 -0500260 iniset $TEMPEST_CONFIG auth admin_username $admin_username
Matthew Treinishfbe0a622015-12-10 19:36:50 -0500261 iniset $TEMPEST_CONFIG auth admin_password "$password"
Sean Dague76392b52016-04-04 09:07:08 -0400262 iniset $TEMPEST_CONFIG auth admin_tenant_name $admin_project_name
263 iniset $TEMPEST_CONFIG auth admin_tenant_id $admin_project_id
Sean Dague0f765352016-02-18 06:53:08 -0500264 iniset $TEMPEST_CONFIG auth admin_domain_name $admin_domain_name
Matthew Treinish7ced1502015-03-23 15:51:54 -0400265 fi
Samuel de Medeiros Queiroz3fd71d62015-05-03 14:54:45 -0300266 if [ "$ENABLE_IDENTITY_V2" == "False" ]; then
267 # Only Identity v3 is available; then skip Identity API v2 tests
Jamie Lennox75c1dfe2015-08-13 10:40:57 +1000268 iniset $TEMPEST_CONFIG identity-feature-enabled api_v2 False
Samuel de Medeiros Queiroz3fd71d62015-05-03 14:54:45 -0300269 # In addition, use v3 auth tokens for running all Tempest tests
270 iniset $TEMPEST_CONFIG identity auth_version v3
271 else
272 iniset $TEMPEST_CONFIG identity auth_version ${TEMPEST_AUTH_VERSION:-v2}
273 fi
274
Rob Crittendene1d013f2015-02-10 14:15:35 -0500275 if is_ssl_enabled_service "key" || is_service_enabled tls-proxy; then
276 iniset $TEMPEST_CONFIG identity ca_certificates_file $SSL_BUNDLE_FILE
277 fi
Attila Fazekas2aa35172012-12-05 20:03:40 +0100278
Sean Daguec3771452013-06-13 14:23:37 -0400279 # Image
Dean Troyerdc97cb72015-03-28 08:20:50 -0500280 # We want to be able to override this variable in the gate to avoid
281 # doing an external HTTP fetch for this test.
Sean Daguec3771452013-06-13 14:23:37 -0400282 if [[ ! -z "$TEMPEST_HTTP_IMAGE" ]]; then
john-griffithdc4dc7f2014-01-22 18:09:32 -0700283 iniset $TEMPEST_CONFIG image http_image $TEMPEST_HTTP_IMAGE
Sean Daguec3771452013-06-13 14:23:37 -0400284 fi
Bob Ball2dd761b2016-01-15 13:56:37 +0000285 if [ "$VIRT_DRIVER" = "xenserver" ]; then
286 iniset $TEMPEST_CONFIG image disk_formats "ami,ari,aki,vhd,raw,iso"
287 fi
Sean Daguec3771452013-06-13 14:23:37 -0400288
David Kranzf100e1c2015-06-01 10:29:59 -0400289 # Image Features
290 iniset $TEMPEST_CONFIG image-feature-enabled deactivate_image True
291
Attila Fazekas97d3d202013-01-19 19:20:49 +0100292 # Compute
john-griffithdc4dc7f2014-01-22 18:09:32 -0700293 iniset $TEMPEST_CONFIG compute ssh_user ${DEFAULT_INSTANCE_USER:-cirros} # DEPRECATED
john-griffithdc4dc7f2014-01-22 18:09:32 -0700294 iniset $TEMPEST_CONFIG compute image_ref $image_uuid
john-griffithdc4dc7f2014-01-22 18:09:32 -0700295 iniset $TEMPEST_CONFIG compute image_ref_alt $image_uuid_alt
Kirill Shileev608f8842014-10-03 22:48:58 +0400296 iniset $TEMPEST_CONFIG compute image_alt_ssh_user ${ALT_INSTANCE_USER:-cirros}
john-griffithdc4dc7f2014-01-22 18:09:32 -0700297 iniset $TEMPEST_CONFIG compute flavor_ref $flavor_ref
298 iniset $TEMPEST_CONFIG compute flavor_ref_alt $flavor_ref_alt
john-griffithdc4dc7f2014-01-22 18:09:32 -0700299 iniset $TEMPEST_CONFIG compute ssh_connect_method $ssh_connect_method
Sean Dague563a7e72015-12-15 17:16:19 -0500300 # set the equiv validation option here as well to ensure they are
301 # in sync. They shouldn't be separate options.
302 iniset $TEMPEST_CONFIG validation connect_method $ssh_connect_method
Matthew Treinish4b684ae2015-05-15 12:38:09 -0400303 if [[ ! $(is_service_enabled n-cell) && ! $(is_service_enabled neutron) ]]; then
melanie wittf5b550e2015-04-10 22:20:07 +0000304 iniset $TEMPEST_CONFIG compute fixed_network_name $PRIVATE_NETWORK_NAME
305 fi
Attila Fazekas97d3d202013-01-19 19:20:49 +0100306
Sean Dague8349aff2015-09-01 12:45:28 -0400307 # Set the service catalog entry for Tempest to run on. Typically
308 # used to try different compute API version targets. The tempest
309 # default if 'compute', which is typically valid, so only set this
310 # if you want to change it.
311 if [[ -n "$TEMPEST_COMPUTE_TYPE" ]]; then
312 iniset $TEMPEST_CONFIG compute catalog_type $TEMPEST_COMPUTE_TYPE
313 fi
314
Sean Daguede19bf92014-03-20 16:54:58 -0400315 # Compute Features
ghanshyam642b07b2015-11-19 10:01:14 +0900316 # Set the microversion range for compute tests.
317 # This is used to run the Nova microversions tests.
318 # Setting [None, latest] range of microversion which allow Tempest to run all microversions tests.
319 # NOTE- To avoid microversion tests failure on stable branch, we need to change "tempest_compute_max_microversion"
320 # for stable branch on each release which should be changed from "latest" to max supported version of that release.
321 local tempest_compute_min_microversion=${TEMPEST_COMPUTE_MIN_MICROVERSION:-None}
322 local tempest_compute_max_microversion=${TEMPEST_COMPUTE_MAX_MICROVERSION:-"latest"}
323 # Reset microversions to None where v2.0 is running which does not support microversion.
324 # Both "None" means no microversion testing.
325 if [[ "$TEMPEST_COMPUTE_TYPE" == "compute_legacy" ]]; then
326 tempest_compute_min_microversion=None
327 tempest_compute_max_microversion=None
328 fi
329 if [ "$tempest_compute_min_microversion" == "None" ]; then
330 inicomment $TEMPEST_CONFIG compute-feature-enabled min_microversion
331 else
332 iniset $TEMPEST_CONFIG compute-feature-enabled min_microversion $tempest_compute_min_microversion
333 fi
334 if [ "$tempest_compute_max_microversion" == "None" ]; then
335 inicomment $TEMPEST_CONFIG compute-feature-enabled max_microversion
336 else
337 iniset $TEMPEST_CONFIG compute-feature-enabled max_microversion $tempest_compute_max_microversion
338 fi
339
Sean Daguede19bf92014-03-20 16:54:58 -0400340 iniset $TEMPEST_CONFIG compute-feature-enabled resize True
Matthew Treinish270f93e2014-03-20 21:18:42 +0000341 iniset $TEMPEST_CONFIG compute-feature-enabled live_migration ${LIVE_MIGRATION_AVAILABLE:-False}
342 iniset $TEMPEST_CONFIG compute-feature-enabled change_password False
343 iniset $TEMPEST_CONFIG compute-feature-enabled block_migration_for_live_migration ${USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION:-False}
Matt Riedemann58065f22015-03-14 06:13:26 -0700344 # TODO(mriedem): Remove the preserve_ports flag when Juno is end of life.
345 iniset $TEMPEST_CONFIG compute-feature-enabled preserve_ports True
Matthew Gilliard1b5a4982015-04-10 08:42:22 +0100346 # TODO(gilliard): Remove the live_migrate_paused_instances flag when Juno is end of life.
347 iniset $TEMPEST_CONFIG compute-feature-enabled live_migrate_paused_instances True
Matt Riedemanne57a3322015-06-20 14:48:00 -0700348 iniset $TEMPEST_CONFIG compute-feature-enabled attach_encrypted_volume ${ATTACH_ENCRYPTED_VOLUME_AVAILABLE:-True}
Matt Riedemann89ee5852015-07-09 13:25:04 -0700349 # TODO(mriedem): Remove this when kilo-eol happens since the
350 # neutron.allow_duplicate_networks option was removed from nova in Liberty
351 # and is now the default behavior.
352 iniset $TEMPEST_CONFIG compute-feature-enabled allow_duplicate_networks ${NOVA_ALLOW_DUPLICATE_NETWORKS:-True}
Chuck Carmack09b431d2015-09-02 14:27:58 +0000353 if is_service_enabled n-cell; then
354 # Cells doesn't support shelving/unshelving
355 iniset $TEMPEST_CONFIG compute-feature-enabled shelve False
Matt Riedemannc94403d2015-10-15 12:51:13 -0700356 # Cells doesn't support hot-plugging virtual interfaces.
357 iniset $TEMPEST_CONFIG compute-feature-enabled interface_attach False
Matt Riedemann2bebf2d2016-04-05 10:34:42 -0400358 # Cells v1 doesn't support the rescue/unrescue tests in Tempest
359 iniset $TEMPEST_CONFIG compute-feature-enabled rescue False
Matt Riedemann6cd616a2015-11-06 10:26:14 -0800360
361 if [[ -z "$DEFAULT_INSTANCE_TYPE" ]]; then
362 # Cells supports resize but does not currently work with devstack
363 # because of the custom flavors created for Tempest runs which are
364 # not in the cells database.
365 # TODO(mriedem): work on adding a nova-manage command to sync
366 # flavors into the cells database.
367 iniset $TEMPEST_CONFIG compute-feature-enabled resize False
368 fi
Chuck Carmack09b431d2015-09-02 14:27:58 +0000369 fi
Sean Daguede19bf92014-03-20 16:54:58 -0400370
Marian Horbanea21eb42015-08-18 06:57:18 -0400371 # Network
john-griffithdc4dc7f2014-01-22 18:09:32 -0700372 iniset $TEMPEST_CONFIG network api_version 2.0
Cedric Brandilyb814b532015-10-22 22:25:45 +0200373 iniset $TEMPEST_CONFIG network tenant_networks_reachable false
john-griffithdc4dc7f2014-01-22 18:09:32 -0700374 iniset $TEMPEST_CONFIG network public_network_id "$public_network_id"
375 iniset $TEMPEST_CONFIG network public_router_id "$public_router_id"
376 iniset $TEMPEST_CONFIG network default_network "$FIXED_RANGE"
Matthew Treinishccf60f72014-03-03 22:48:31 -0500377 iniset $TEMPEST_CONFIG network-feature-enabled ipv6 "$IPV6_ENABLED"
Sean M. Collinsbb2908b2014-05-15 10:24:31 -0400378 iniset $TEMPEST_CONFIG network-feature-enabled ipv6_subnet_attributes "$IPV6_SUBNET_ATTRIBUTES_ENABLED"
Salvatore33e8ee22014-10-05 01:36:34 +0200379
Sean Dague669c4fc2014-04-03 11:28:01 -0400380 # Orchestration Tests
381 if is_service_enabled heat; then
Rabi Mishra95560932016-02-01 13:20:18 +0530382 # Though this is not needed by heat, some tempest tests explicitly
383 # try to set this role. Removing them from the tempest tests breaks
384 # some non-devstack CIs.
385 get_or_create_role "heat_stack_owner"
386
Sean Dague669c4fc2014-04-03 11:28:01 -0400387 if [[ ! -z "$HEAT_CFN_IMAGE_URL" ]]; then
Alessandro Pilottif3e75bf2014-12-15 20:02:08 +0200388 iniset $TEMPEST_CONFIG orchestration image_ref $(basename "${HEAT_CFN_IMAGE_URL%.*}")
Sean Dague669c4fc2014-04-03 11:28:01 -0400389 fi
Mathieu Rohon0c985c82016-02-25 10:00:36 +0000390 # Nova might not be enabled, especially when we want to test tempest scenario/API that only create Neutron resources
391 if is_service_enabled nova; then
392 # build a specialized heat flavor
393 available_flavors=$(nova flavor-list)
394 if [[ ! ( $available_flavors =~ 'm1.heat' ) ]]; then
395 nova flavor-create m1.heat 451 512 0 1
396 fi
397 iniset $TEMPEST_CONFIG orchestration instance_type "m1.heat"
Sean Dague669c4fc2014-04-03 11:28:01 -0400398 fi
Sean Dague669c4fc2014-04-03 11:28:01 -0400399 iniset $TEMPEST_CONFIG orchestration build_timeout 900
Rabi Mishra95560932016-02-01 13:20:18 +0530400 iniset $TEMPEST_CONFIG orchestration stack_owner_role "heat_stack_owner"
Steve Bakerd5cccad2013-07-19 10:34:24 +1200401 fi
402
William Marshall24d866e2013-07-02 12:26:31 -0500403 # Scenario
Matthew Treinishd2cb2342015-04-02 11:08:24 -0400404 SCENARIO_IMAGE_DIR=${SCENARIO_IMAGE_DIR:-$FILES/images/cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-uec}
405 iniset $TEMPEST_CONFIG scenario img_dir $SCENARIO_IMAGE_DIR
Adalberto Medeiros53971532014-07-10 16:55:49 -0300406 iniset $TEMPEST_CONFIG scenario ami_img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-blank.img"
407 iniset $TEMPEST_CONFIG scenario ari_img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-initrd"
408 iniset $TEMPEST_CONFIG scenario aki_img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-vmlinuz"
Matthew Treinishd2cb2342015-04-02 11:08:24 -0400409 iniset $TEMPEST_CONFIG scenario img_file "cirros-${CIRROS_VERSION}-${CIRROS_ARCH}-disk.img"
William Marshall24d866e2013-07-02 12:26:31 -0500410
Joe Gordonbb8c6d42013-08-26 17:00:05 -0400411 # Large Ops Number
john-griffithdc4dc7f2014-01-22 18:09:32 -0700412 iniset $TEMPEST_CONFIG scenario large_ops_number ${TEMPEST_LARGE_OPS_NUMBER:-0}
Joe Gordonbb8c6d42013-08-26 17:00:05 -0400413
Vadim Rovachev2541d612014-05-29 18:48:10 +0400414 # Telemetry
gordon chung71e4e6f2015-03-16 16:33:01 -0400415 iniset $TEMPEST_CONFIG telemetry-feature-enabled events "True"
Vadim Rovachev2541d612014-05-29 18:48:10 +0400416
lanoux994db612015-08-03 13:48:12 +0000417 # Validation
418 iniset $TEMPEST_CONFIG validation run_validation ${TEMPEST_RUN_VALIDATION:-False}
Matthew Treinishfbe0a622015-12-10 19:36:50 -0500419 iniset $TEMPEST_CONFIG validation ip_version_for_ssh 4
420 iniset $TEMPEST_CONFIG validation ssh_timeout $BUILD_TIMEOUT
421 iniset $TEMPEST_CONFIG validation image_ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
422 iniset $TEMPEST_CONFIG validation network_for_ssh $PRIVATE_NETWORK_NAME
lanoux994db612015-08-03 13:48:12 +0000423
Giulio Fidente97e1bd02013-06-04 05:33:52 +0200424 # Volume
obutenkoa366b972015-10-20 19:07:04 +0300425 # TODO(obutenko): Remove the incremental_backup_force flag when Kilo and Juno is end of life.
426 iniset $TEMPEST_CONFIG volume-feature-enabled incremental_backup_force True
Yuriy Nesenenkoaf8b6e12016-01-06 17:14:45 +0200427 # TODO(ynesenenko): Remove the volume_services flag when Liberty and Kilo will correct work with host info.
428 iniset $TEMPEST_CONFIG volume-feature-enabled volume_services True
Alex Meade06c7a442016-04-01 13:18:32 -0400429 # TODO(ameade): Remove the api_v3 flag when Mitaka and Liberty are end of life.
430 iniset $TEMPEST_CONFIG volume-feature-enabled api_v3 True
David Kranzd1d66672015-06-11 13:09:37 -0400431
Giulio Fidente3d60f4d2014-02-20 16:43:49 +0100432 if ! is_service_enabled c-bak; then
433 iniset $TEMPEST_CONFIG volume-feature-enabled backup False
Giulio Fidente3632ab12013-09-10 02:51:26 +0200434 fi
Swapnil Kulkarni09fb7ba2014-10-16 06:30:28 +0000435
Dean Troyerdc97cb72015-03-28 08:20:50 -0500436 # Using ``CINDER_ENABLED_BACKENDS``
Swapnil Kulkarni09fb7ba2014-10-16 06:30:28 +0000437 if [[ -n "$CINDER_ENABLED_BACKENDS" ]] && [[ $CINDER_ENABLED_BACKENDS =~ .*,.* ]]; then
Matthew Treinishdb1c3842014-02-04 20:58:00 +0000438 iniset $TEMPEST_CONFIG volume-feature-enabled multi_backend "True"
Swapnil Kulkarni09fb7ba2014-10-16 06:30:28 +0000439 local i=1
440 local be
441 for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
442 local be_name=${be##*:}
443 iniset $TEMPEST_CONFIG volume "backend${i}_name" "$be_name"
444 i=$(( i + 1 ))
445 done
john-griffithdc4dc7f2014-01-22 18:09:32 -0700446 fi
447
Eric Harney01456482014-10-14 18:53:53 -0400448 if [ $TEMPEST_VOLUME_DRIVER != "default" -o \
Patrick East1c0628f2014-10-22 16:22:47 -0700449 "$TEMPEST_VOLUME_VENDOR" != "$TEMPEST_DEFAULT_VOLUME_VENDOR" ]; then
Ed Balduf2f23d752014-07-29 14:42:27 -0600450 iniset $TEMPEST_CONFIG volume vendor_name "$TEMPEST_VOLUME_VENDOR"
Eric Harney01456482014-10-14 18:53:53 -0400451 fi
452 if [ $TEMPEST_VOLUME_DRIVER != "default" -o \
JordanP82a7d932014-12-04 14:09:16 +0100453 "$TEMPEST_STORAGE_PROTOCOL" != "$TEMPEST_DEFAULT_STORAGE_PROTOCOL" ]; then
454 iniset $TEMPEST_CONFIG volume storage_protocol "$TEMPEST_STORAGE_PROTOCOL"
Giulio Fidente97e1bd02013-06-04 05:33:52 +0200455 fi
456
Julie Pichonfea70f82013-07-29 11:22:08 +0100457 # Dashboard
john-griffithdc4dc7f2014-01-22 18:09:32 -0700458 iniset $TEMPEST_CONFIG dashboard dashboard_url "http://$SERVICE_HOST/"
Julie Pichonfea70f82013-07-29 11:22:08 +0100459
Dean Troyerdc97cb72015-03-28 08:20:50 -0500460 # CLI
john-griffithdc4dc7f2014-01-22 18:09:32 -0700461 iniset $TEMPEST_CONFIG cli cli_dir $NOVA_BIN_DIR
Ian Wienand7fa19022013-06-25 14:11:48 +1000462
Adam Gandelman43bd6672014-04-03 11:13:13 -0700463 # Baremetal
464 if [ "$VIRT_DRIVER" = "ironic" ] ; then
465 iniset $TEMPEST_CONFIG baremetal driver_enabled True
Michael Turekd091a2d2016-01-11 18:17:50 +0000466 iniset $TEMPEST_CONFIG baremetal unprovision_timeout $BUILD_TIMEOUT
467 iniset $TEMPEST_CONFIG baremetal active_timeout $BUILD_TIMEOUT
Vladyslav Drok41309002015-04-29 13:36:52 +0300468 iniset $TEMPEST_CONFIG baremetal deploy_img_dir $FILES
469 iniset $TEMPEST_CONFIG baremetal node_uuid $IRONIC_NODE_UUID
Adam Gandelmanfdfe7a02014-07-24 10:06:18 -0400470 iniset $TEMPEST_CONFIG compute-feature-enabled change_password False
471 iniset $TEMPEST_CONFIG compute-feature-enabled console_output False
472 iniset $TEMPEST_CONFIG compute-feature-enabled interface_attach False
473 iniset $TEMPEST_CONFIG compute-feature-enabled live_migration False
474 iniset $TEMPEST_CONFIG compute-feature-enabled pause False
475 iniset $TEMPEST_CONFIG compute-feature-enabled rescue False
476 iniset $TEMPEST_CONFIG compute-feature-enabled resize False
477 iniset $TEMPEST_CONFIG compute-feature-enabled shelve False
478 iniset $TEMPEST_CONFIG compute-feature-enabled snapshot False
David Shrewsburycf21b712014-08-13 07:03:58 -0400479 iniset $TEMPEST_CONFIG compute-feature-enabled suspend False
Adam Gandelman43bd6672014-04-03 11:13:13 -0700480 fi
481
Nels Nelson7b47c472015-01-05 16:36:42 -0600482 # Libvirt-LXC
483 if [ "$VIRT_DRIVER" = "libvirt" ] && [ "$LIBVIRT_TYPE" = "lxc" ]; then
484 iniset $TEMPEST_CONFIG compute-feature-enabled rescue False
485 iniset $TEMPEST_CONFIG compute-feature-enabled resize False
Matt Riedemanncf94edc2015-10-28 09:50:01 -0700486 iniset $TEMPEST_CONFIG compute-feature-enabled shelve False
487 iniset $TEMPEST_CONFIG compute-feature-enabled snapshot False
Nels Nelson7b47c472015-01-05 16:36:42 -0600488 iniset $TEMPEST_CONFIG compute-feature-enabled suspend False
489 fi
490
Dean Troyerdc97cb72015-03-28 08:20:50 -0500491 # ``service_available``
Sean Dague346edcc2015-08-26 09:38:37 -0400492 #
493 # this tempest service list needs to be all the services that
494 # tempest supports, otherwise we can have an erroneous set of
495 # defaults (something defaulting true in Tempest, but not listed here).
Sean Dague0f765352016-02-18 06:53:08 -0500496 local service
497 local tempest_services="key,glance,nova,neutron,cinder,swift,heat,ceilometer,horizon,sahara,ironic,trove"
498 for service in ${tempest_services//,/ }; do
Matthew Treinishb56d81d2013-07-23 17:25:39 -0400499 if is_service_enabled $service ; then
john-griffithdc4dc7f2014-01-22 18:09:32 -0700500 iniset $TEMPEST_CONFIG service_available $service "True"
Matthew Treinishb56d81d2013-07-23 17:25:39 -0400501 else
john-griffithdc4dc7f2014-01-22 18:09:32 -0700502 iniset $TEMPEST_CONFIG service_available $service "False"
Matthew Treinishb56d81d2013-07-23 17:25:39 -0400503 fi
504 done
505
Matt Riedemanncf94edc2015-10-28 09:50:01 -0700506 if [ "$VIRT_DRIVER" = "libvirt" ] && [ "$LIBVIRT_TYPE" = "lxc" ]; then
507 # libvirt-lxc does not support boot from volume or attaching volumes
508 # so basically anything with cinder is out of the question.
509 iniset $TEMPEST_CONFIG service_available cinder "False"
510 fi
511
Matthew Treinishe8f3f7a2016-04-11 12:52:39 -0400512 # Run tempest configuration utilities. This must be done last during configuration to
513 # ensure as complete a config as possible already exists
514
515 # NOTE(mtreinish): Respect constraints on tempest verify-config venv
516 local tmp_cfg_file
517 tmp_cfg_file=$(mktemp)
518 cd $TEMPEST_DIR
519 if [[ "$OFFLINE" != "True" ]]; then
520 tox -revenv --notest
521 fi
522 tox -evenv -- pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
523
524 # Auth:
525 iniset $TEMPEST_CONFIG auth tempest_roles "Member"
526 if [[ $TEMPEST_USE_TEST_ACCOUNTS == "True" ]]; then
527 if [[ $TEMPEST_HAS_ADMIN == "True" ]]; then
528 tox -evenv -- tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-tenant-name $admin_project_name -r $TEMPEST_CONCURRENCY --with-admin etc/accounts.yaml
529 else
530 tox -evenv -- tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-tenant-name $admin_project_name -r $TEMPEST_CONCURRENCY etc/accounts.yaml
531 fi
532 iniset $TEMPEST_CONFIG auth use_dynamic_credentials False
533 iniset $TEMPEST_CONFIG auth test_accounts_file "etc/accounts.yaml"
534 elif [[ $TEMPEST_HAS_ADMIN == "False" ]]; then
535 iniset $TEMPEST_CONFIG auth use_dynamic_credentials ${TEMPEST_ALLOW_TENANT_ISOLATION:-False}
536
537 else
538 iniset $TEMPEST_CONFIG auth use_dynamic_credentials ${TEMPEST_ALLOW_TENANT_ISOLATION:-True}
539 fi
540
541 # API Extensions
542 # Run ``verify_tempest_config -ur`` to retrieve enabled extensions on API endpoints
543 # NOTE(mtreinish): This must be done after auth settings are added to the tempest config
544 tox -evenv -- tempest verify-config -uro $tmp_cfg_file
545 # Nova API extensions
546 local compute_api_extensions=${COMPUTE_API_EXTENSIONS:-"all"}
547 if [[ ! -z "$DISABLE_COMPUTE_API_EXTENSIONS" ]]; then
548 # Enabled extensions are either the ones explicitly specified or those available on the API endpoint
549 compute_api_extensions=${COMPUTE_API_EXTENSIONS:-$(iniget $tmp_cfg_file compute-feature-enabled api_extensions | tr -d " ")}
550 # Remove disabled extensions
551 compute_api_extensions=$(remove_disabled_extensions $compute_api_extensions $DISABLE_COMPUTE_API_EXTENSIONS)
552 fi
553 iniset $TEMPEST_CONFIG compute-feature-enabled api_extensions $compute_api_extensions
554 # Neutron API Extensions
555 local network_api_extensions=${NETWORK_API_EXTENSIONS:-"all"}
556 if [[ ! -z "$DISABLE_NETWORK_API_EXTENSIONS" ]]; then
557 # Enabled extensions are either the ones explicitly specified or those available on the API endpoint
558 network_api_extensions=${NETWORK_API_EXTENSIONS:-$(iniget $tmp_cfg_file network-feature-enabled api_extensions | tr -d " ")}
559 # Remove disabled extensions
560 network_api_extensions=$(remove_disabled_extensions $network_api_extensions $DISABLE_NETWORK_API_EXTENSIONS)
561 fi
562 iniset $TEMPEST_CONFIG network-feature-enabled api_extensions $network_api_extensions
563 # Swift API Extensions
564 local object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-"all"}
565 if [[ ! -z "$DISABLE_OBJECT_STORAGE_API_EXTENSIONS" ]]; then
566 # Enabled extensions are either the ones explicitly specified or those available on the API endpoint
567 object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-$(iniget $tmp_cfg_file object-storage-feature-enabled discoverable_apis | tr -d " ")}
568 # Remove disabled extensions
569 object_storage_api_extensions=$(remove_disabled_extensions $object_storage_api_extensions $DISABLE_STORAGE_API_EXTENSIONS)
570 fi
571 iniset $TEMPEST_CONFIG object-storage-feature-enabled discoverable_apis $object_storage_api_extensions
572 # Cinder API Extensions
573 local volume_api_extensions=${VOLUME_API_EXTENSIONS:-"all"}
574 if [[ ! -z "$DISABLE_VOLUME_API_EXTENSIONS" ]]; then
575 # Enabled extensions are either the ones explicitly specified or those available on the API endpoint
576 volume_api_extensions=${VOLUME_API_EXTENSIONS:-$(iniget $tmp_cfg_file volume-feature-enabled api_extensions | tr -d " ")}
577 # Remove disabled extensions
578 volume_api_extensions=$(remove_disabled_extensions $volume_api_extensions $DISABLE_VOLUME_API_EXTENSIONS)
579 fi
580 iniset $TEMPEST_CONFIG volume-feature-enabled api_extensions $volume_api_extensions
581
Attila Fazekas2aa35172012-12-05 20:03:40 +0100582 # Restore IFS
583 IFS=$ifs
Sean Dagued0931212012-10-04 16:06:44 -0400584}
585
Sean Dagued0931212012-10-04 16:06:44 -0400586# install_tempest() - Collect source and prepare
Ian Wienandaee18c72014-02-21 15:35:08 +1100587function install_tempest {
Sean Dagued0931212012-10-04 16:06:44 -0400588 git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH
Clark Boylan33dc8692014-08-19 22:37:10 -0700589 pip_install tox
Matthew Treinish83e166b2015-02-18 19:01:20 -0500590 pushd $TEMPEST_DIR
591 tox --notest -efull
Matthew Treinish1e31e682016-02-09 23:50:54 -0500592 # NOTE(mtreinish) Respect constraints in the tempest full venv, things that
593 # are using a tox job other than full will not be respecting constraints but
594 # running pip install -U on tempest requirements
Matthew Treinishb31640a2016-05-02 16:33:29 -0400595 if [[ -d .tox/tempest ]] ; then
596 $TEMPEST_DIR/.tox/tempest/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
597 PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest
598 else
599 $TEMPEST_DIR/.tox/full/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
600 PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/full
601 fi
Matthew Treinish83e166b2015-02-18 19:01:20 -0500602 popd
Sean Dagued0931212012-10-04 16:06:44 -0400603}
604
Sean Dagued0931212012-10-04 16:06:44 -0400605# Restore xtrace
Ian Wienand523f4882015-10-13 11:03:03 +1100606$_XTRACE_TEMPEST
Sean Dague584d90e2013-03-29 14:34:53 -0400607
Adam Spiers6a5aa7c2013-10-24 11:27:02 +0100608# Tell emacs to use shell-script-mode
609## Local variables:
610## mode: shell-script
611## End: