#!/bin/sh -
#
# Usage:
#	TESTALL <pmake-to-test>
#
# Places output in /tmp/pmake.output
#
CLEANFILES='ucb openStreams openStreams.o ucb.[oc] 123*.[co] libtest.a test.a'

file=/tmp/pmake.output
:> $file
trap "rm -f $CLEANFILES; exit 0" 0 1 2 15

echo routing output to $file
for i in ${2-*.test};
do
    echo '*** Testing' $i | tee -a $file
    echo "" >> $file
    PMAKE="$PMAKE -C" ${1-pmake} -f $i 2>&1 | tee -a $file
    echo "" >> $file
    echo "" >> $file
done
