Skip to content

Commit cf3d3cd

Browse files
gerardrochenikic
authored andcommitted
Fix PostgreSQL and MySQL setup on Travis CI
Note that the PostgreSQL tests still don't work on some architectures. Closes GH-5607.
1 parent d1dde09 commit cf3d3cd

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

travis/setup-mysql.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#!/bin/bash
2-
if [ -n "$ARM64" ]; then
3-
sudo mysql -e 'CREATE USER "travis"@"localhost" IDENTIFIED BY ""'
4-
sudo mysql -e 'GRANT ALL PRIVILEGES ON *.* TO "travis"@"localhost"'
5-
fi
6-
mysql -e "CREATE DATABASE IF NOT EXISTS test"
1+
#!/bin/sh
2+
set -ev
3+
4+
mysql -vvv -e "CREATE DATABASE IF NOT EXISTS test"

travis/setup-pgsql.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
#!/bin/bash
2-
echo '
3-
<?php $conn_str .= " user=postgres"; ?>' >> "./ext/pgsql/tests/config.inc"
4-
if [ -z "$ARM64" -o -z "$S390X"]; then
5-
psql -c 'create database test;' -U postgres
1+
#!/bin/sh
2+
set -ev
3+
4+
# PostgreSQL tests currently don't work on some architectures.
5+
if test -z "${ARM64}${S390X}"; then
6+
psql -c "ALTER USER postgres PASSWORD 'postgres';" -U postgres
7+
psql -c "CREATE DATABASE test;" -U postgres
68
fi

0 commit comments

Comments
 (0)