Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc G. Fournier1997-04-17 13:48:52 +0000
committerMarc G. Fournier1997-04-17 13:48:52 +0000
commitcfe0d67dc11377abf1befd302c1fce63a006c52a (patch)
tree5a95ff41ee970bd96edd0483718f2585b9830718
parenta0d63ac98c3144373ddc9c879c574a0bf03f1a32 (diff)
Some slight changes to the Wisconsin Benchmark tests since postgres requires
a -D<datadir> option
-rwxr-xr-xsrc/test/bench/create.sh12
-rwxr-xr-xsrc/test/bench/runwisc.sh11
2 files changed, 16 insertions, 7 deletions
diff --git a/src/test/bench/create.sh b/src/test/bench/create.sh
index 57563d8d4a5..efdecb9403f 100755
--- a/src/test/bench/create.sh
+++ b/src/test/bench/create.sh
@@ -1,21 +1,25 @@
#!/bin/sh
-# $Header: /cvsroot/pgsql/src/test/bench/Attic/create.sh,v 1.1.1.1 1996/07/09 06:22:21 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/test/bench/Attic/create.sh,v 1.2 1997/04/17 13:48:49 scrappy Exp $
#
+if [ ! -d $1 ]; then
+ echo " you must specify a valid data directory "
+ exit
+fi
if [ -d ./obj ]; then
cd ./obj
fi
echo =============== destroying old bench database... =================
-echo "drop database bench" | postgres template1 > /dev/null
+echo "drop database bench" | postgres -D${1} template1 > /dev/null
echo =============== creating new bench database... =================
-echo "create database bench" | postgres template1 > /dev/null
+echo "create database bench" | postgres -D${1} template1 > /dev/null
if [ $? -ne 0 ]; then
echo createdb failed
exit 1
fi
-postgres -Q bench < create.sql > /dev/null
+postgres -D${1} -Q bench < create.sql > /dev/null
if [ $? -ne 0 ]; then
echo initial database load failed
exit 1
diff --git a/src/test/bench/runwisc.sh b/src/test/bench/runwisc.sh
index 0d5afa389e0..50bf3532fa6 100755
--- a/src/test/bench/runwisc.sh
+++ b/src/test/bench/runwisc.sh
@@ -1,17 +1,22 @@
#!/bin/sh
-# $Header: /cvsroot/pgsql/src/test/bench/Attic/runwisc.sh,v 1.1.1.1 1996/07/09 06:22:23 scrappy Exp $
+# $Header: /cvsroot/pgsql/src/test/bench/Attic/runwisc.sh,v 1.2 1997/04/17 13:48:52 scrappy Exp $
#
# Note that in our published benchmark numbers, we executed the command in the
# following fashion:
#
# time $POSTGRES -texecutor -tplanner -f hashjoin -Q bench
#
+if [ ! -d $1 ]; then
+ echo " you must specify a valid data directory "
+ exit
+fi
+
if [ -d ./obj ]; then
cd ./obj
fi
echo =============== vacuuming benchmark database... =================
-echo "vacuum" | postgres -Q bench > /dev/null
+echo "vacuum" | postgres -D${1} -Q bench > /dev/null
echo =============== running benchmark... =================
-time postgres -texecutor -tplanner -Q bench < bench.sql
+time postgres -D${1} -texecutor -tplanner -Q bench < bench.sql