#!/bin/sh

# $Header: /usr/local/dev/postgres/mastertree/newconf/RCS/alltests.sh,v 1.2 1992/01/14 20:03:01 mer Exp $

# This is a shell script that runs all of the Postgres demo tests.
# It is the last thing done before releasing and should execute
# flawlessly from beginning to end.

CWD=`pwd`

# PMTESTS run under the postmaster while BETESTS are the backend in
# standalone mode.

PMTESTS="demo video"
BETESTS="bench"

PM=$POSTGRESHOME/bin/postmaster

for i in $BETESTS
do
	echo running $i...
	cd $POSTGRESHOME/$i
	rm -f $CWD/$i.out
	./whole$i.sh > $CWD/$i.out 2>&1
done

$PM &
PMPID=$!

for i in $PMTESTS
do
	echo running $i...
	cd $POSTGRESHOME/$i
	rm -f $CWD/$i.out
	./whole$i.sh > $CWD/$i.out 2>&1
done

kill -15 $PMPID


echo alltests done.
