diff --git a/test_pg.sh b/test_pg.sh index 7fcb943f46ab8d8e7009be8bf3dd17078d82355b..48e95b4e0544f2e9804baa954752481e55a1c187 100644 --- a/test_pg.sh +++ b/test_pg.sh @@ -2,6 +2,8 @@ set -eu +go test -c & + # Try to find a Postgres installation (Debian installs PG commands to their own dir) if ! which pg_ctl >/dev/null 2>/dev/null; then pg_path=$(echo /usr/lib/postgresql/*/bin | grep -vF '*' | head -1) @@ -47,4 +49,10 @@ done export PGHOST="$PGHOST" createdb goatherd_test -DB_DRIVER=postgres DB_URL="host=$PGHOST dbname=goatherd_test" go test "$@" +echo Waiting for compile to finish +wait + +echo +echo ===== Tests ===== + +DB_DRIVER=postgres DB_URL="host=$PGHOST dbname=goatherd_test" ./goatherd.test "$@"