Skip to content
Snippets Groups Projects
Commit 21cb18f7 authored by Lukas Braun's avatar Lukas Braun
Browse files

test_pg.sh: start server while compiling

parent e0b27e9c
No related branches found
No related tags found
No related merge requests found
......@@ -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 "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment