File: post_test_hook.sh

package info (click to toggle)
python-openstacksdk 0.50.0-6
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,632 kB
  • sloc: python: 83,132; sh: 194; makefile: 21
file content (35 lines) | stat: -rwxr-xr-x 1,141 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
#
# This is a script that kicks off a series of functional tests against a
# OpenStack devstack cloud.  This script is intended to work as a gate
# in project-config for the Python SDK.

DIR=$(cd $(dirname "$0") && pwd)

echo "Running SDK functional test suite"
sudo -H -u stack -i <<!
export OS_CLOUD=devstack-admin
echo 'Running tests with:'
cat /etc/openstack/clouds.yaml

cd ${DIR}
echo '=functional=============================================='
if [[ -n "$1" ]]; then
    tox -e functional -- $1
else
    tox -e functional
fi
FUNCTIONAL_RESULT=\$?
echo '=examples================================================'
tox -e examples
EXAMPLES_RESULT=\$?
echo '========================================================='
echo "Functional test result: \$FUNCTIONAL_RESULT"
echo "Examples test result:   \$EXAMPLES_RESULT"
test \$FUNCTIONAL_RESULT == 0 -a \$EXAMPLES_RESULT == 0
!
# TODO(thowe) For now we are going to ignore tests failures
# It is easier to change this script than the gate.  The magic
# string fro this script should probably specify the -e option
# so the script will fail immediately if a command fails.
exit 0