From cf3d3cd86fa63a1b8e0166b683d86a1ee305576a Mon Sep 17 00:00:00 2001 From: Gerard Roche Date: Wed, 20 May 2020 20:03:10 +0100 Subject: Fix PostgreSQL and MySQL setup on Travis CI Note that the PostgreSQL tests still don't work on some architectures. Closes GH-5607. --- travis/setup-mysql.sh | 10 ++++------ travis/setup-pgsql.sh | 12 +++++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/travis/setup-mysql.sh b/travis/setup-mysql.sh index 4866f24442..1199fceb22 100755 --- a/travis/setup-mysql.sh +++ b/travis/setup-mysql.sh @@ -1,6 +1,4 @@ -#!/bin/bash -if [ -n "$ARM64" ]; then - sudo mysql -e 'CREATE USER "travis"@"localhost" IDENTIFIED BY ""' - sudo mysql -e 'GRANT ALL PRIVILEGES ON *.* TO "travis"@"localhost"' -fi -mysql -e "CREATE DATABASE IF NOT EXISTS test" +#!/bin/sh +set -ev + +mysql -vvv -e "CREATE DATABASE IF NOT EXISTS test" diff --git a/travis/setup-pgsql.sh b/travis/setup-pgsql.sh index d0929de9f0..3fea8f70b4 100755 --- a/travis/setup-pgsql.sh +++ b/travis/setup-pgsql.sh @@ -1,6 +1,8 @@ -#!/bin/bash -echo ' -' >> "./ext/pgsql/tests/config.inc" -if [ -z "$ARM64" -o -z "$S390X"]; then - psql -c 'create database test;' -U postgres +#!/bin/sh +set -ev + +# PostgreSQL tests currently don't work on some architectures. +if test -z "${ARM64}${S390X}"; then + psql -c "ALTER USER postgres PASSWORD 'postgres';" -U postgres + psql -c "CREATE DATABASE test;" -U postgres fi -- cgit v1.2.1