#!/bin/sh
#
# Script to run LLC2 DLPI tests
#

TESTS="test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 \
test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 test22 \
test23"

if [ $# -ne 0 ]
then
	TESTS="$*"
fi

[ -d output ] || mkdir output

for i in $TESTS
do
	./test <$i >output/$i.out
	grep "ERROR:" output/$i.out
	if [ $? -eq 0 ]
	then
		echo "ERROR in script $i - see file output/$i.out"
	else
		echo "$i ran successfully"
	fi
done
