X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fget-data-psql.sh;h=fa61d6d684db5ee9ea1060ad6f6dd69cc31f2666;hb=e93857e0338c2a71794db2b57e3659bbe6946240;hp=521a97f84c941c6e7a3615770b77c4f8552d66e9;hpb=58c47d4adc7f01f7fb82219cc73bd96dee837fdb;p=pspp-builds.git diff --git a/tests/command/get-data-psql.sh b/tests/command/get-data-psql.sh index 521a97f8..fa61d6d6 100755 --- a/tests/command/get-data-psql.sh +++ b/tests/command/get-data-psql.sh @@ -22,7 +22,7 @@ export LANG port=6543 dbase=pspptest PG_CONFIG=${PG_CONFIG:=pg_config} -pgpath=`$PG_CONFIG | awk '/BINDIR/{print $3}'` +pgpath=`$PG_CONFIG --bindir` cleanup() { @@ -31,6 +31,7 @@ cleanup() return ; fi PGHOST=$TEMPDIR $pgpath/pg_ctl -D $TEMPDIR/cluster stop -W -o "-k $TEMPDIR -h ''" > /dev/null 2>&1 + cd / rm -rf $TEMPDIR } @@ -78,11 +79,12 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="create database" -createdb -h $TEMPDIR -p $port $dbase > /dev/null 2> /dev/null +$pgpath/createdb -h $TEMPDIR -p $port $dbase > /dev/null 2> /dev/null +if [ $? -ne 0 ] ; then no_result ; fi activity="populate database" -psql -h $TEMPDIR -p $port $dbase > /dev/null << EOF +$pgpath/psql -h $TEMPDIR -p $port $dbase > /dev/null << EOF CREATE TABLE empty (a int, b date, c numeric(23, 4));