#! /bin/sh
# 
# usage: runtest [<testfile>...]
# without args, runs all *.test files in the current directory   
#

# Use -N to test with dynamic NED loading
OPT=
#OPT="-N"


# --- nothing to change below this line ---

TESTFILES=$*
if [ "x$TESTFILES" = "x" ]; then TESTFILES='*.test'; fi
if [ ! -d work ];  then mkdir work; fi
opp_test -g $OPT -v $TESTFILES || exit 1
echo
(cd work; opp_makemake $OPT -f $OPT -u cmdenv; make) || exit 1
echo
opp_test -r $OPT -v $TESTFILES || exit 1
echo
echo Results can be found in ./work

