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
|
#!/bin/sh
. /usr/share/postgresql-common/pgcommon.sh
locale_gen en_US.UTF-8 UTF-8
export LANG=en_US.UTF-8
unset LANGUAGE LC_ALL LC_CTYPE
MYSQL="mysql --defaults-file=/etc/mysql/debian.cnf -v mysql"
(
set -eu
service mariadb start || service mysql start
# Create the MySQL test database and user.
echo "== creating the MySQL test database"
cat debian/tests/mysql.testschema.sql | $MYSQL
./mysql_init.sh
PG_VIRTUALENV_UNSHARE="" pg_buildext installcheck
)
status=$?
(
# Cleanup the MySQL test database (even in case of an error above)
echo "== dropping the MySQL test database"
echo "DROP USER 'edb'@'localhost'" | $MYSQL
echo "DROP DATABASE mysql_fdw_regress" | $MYSQL
echo "DROP DATABASE mysql_fdw_regress1" | $MYSQL
service mariadb stop || service mysql stop
)
exit $status
|