76d367be56
The py311 job has currently trouble locating mysqld. On debian the mysqld binary is installed to /usr/sbin, but on debian /usr/sbin isn't in PATH by default. This patch appends /usr/sbin to PATH. Change-Id: I89b2631f38e6a7292d6e58b4ddee6f7fdfc6fa9f
40 lines
886 B
Bash
Executable File
40 lines
886 B
Bash
Executable File
#!/bin/bash -x
|
|
set -e
|
|
|
|
AODH_TEST_DRIVERS=${AODH_TEST_DRIVERS:-postgresql}
|
|
export GABBI_LIVE_FAIL_IF_NO_TEST=1
|
|
export AODH_SERVICE_TOKEN=foobar # Needed for gabbi
|
|
export AODH_SERVICE_ROLES=admin
|
|
|
|
# mysqld may be installed to /usr/sbin, which isn't in
|
|
# PATH on some distributions
|
|
export PATH=$PATH:/usr/sbin
|
|
|
|
# unit tests
|
|
|
|
export OS_TEST_PATH=aodh/tests/unit
|
|
stestr run $*
|
|
|
|
# functional tests
|
|
|
|
export OS_TEST_PATH=aodh/tests/functional
|
|
for indexer in ${AODH_TEST_DRIVERS}
|
|
do
|
|
pifpaf -g AODH_TEST_STORAGE_URL run $indexer -- stestr run $*
|
|
done
|
|
|
|
# live functional tests
|
|
|
|
cleanup(){
|
|
type -t database_stop >/dev/null && database_stop || true
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
export OS_TEST_PATH=aodh/tests/functional_live
|
|
for indexer in ${AODH_TEST_DRIVERS}
|
|
do
|
|
eval $(pifpaf -e DATABASE run $indexer)
|
|
pifpaf -e AODH run aodh --database-url $DATABASE_URL -- stestr run $*
|
|
cleanup
|
|
done
|