185f5acfe8
Now if something can not be cleaned up we get error and in case of CI job it is 'fail' of job. We should be able to suppress such errors. Added config option 'suppress_errors_in_cleanup' that allows us to raise errors when it is 'False' and log errors when it is 'True'. Disable it by default. Enable it for CI Tempest jobs. Implements blueprint tempest-clean-up-suppress-errors Change-Id: I03a39cc020f52d54211369c8f5cbfc2e14651a21
45 lines
1.6 KiB
Bash
Executable File
45 lines
1.6 KiB
Bash
Executable File
#!/bin/bash -xe
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
# This script is executed inside post_test_hook function in devstack gate.
|
|
|
|
sudo chown -R jenkins:stack $BASE/new/tempest
|
|
sudo chown -R jenkins:stack $BASE/data/tempest
|
|
sudo chmod -R o+rx $BASE/new/devstack/files
|
|
|
|
if [[ "$1" =~ "multibackend" ]]; then
|
|
# if arg $1 has "multibackend", then we assume multibackend installation
|
|
source $BASE/new/devstack/functions
|
|
iniset $BASE/new/tempest/etc/tempest.conf share multi_backend True
|
|
|
|
# backend names are defined in pre_test_hook
|
|
iniset $BASE/new/tempest/etc/tempest.conf share backend_names "LONDON,PARIS"
|
|
|
|
# Suppress errors in cleanup of resources
|
|
iniset $BASE/new/tempest/etc/tempest.conf share suppress_errors_in_cleanup True
|
|
fi
|
|
|
|
# let us control if we die or not
|
|
set +o errexit
|
|
cd $BASE/new/tempest
|
|
|
|
export TEMPEST_CONCURRENCY=12
|
|
export MANILA_TESTS='tempest.cli.*manila*'
|
|
if [[ ! "$ZUUL_PROJECT" =~ python-manilaclient ]]; then
|
|
MANILA_TESTS+=' tempest.api.share*';
|
|
fi
|
|
|
|
echo "Running tempest manila test suites"
|
|
sudo -H -u jenkins tox -eall $MANILA_TESTS -- --concurrency=$TEMPEST_CONCURRENCY
|