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

#MAKE=make

TESTFILES=$*
if [ "x$TESTFILES" = "x" ]; then TESTFILES='*.test'; fi
if [ ! -d work ];  then mkdir work; fi
#rm -rf work/lib
#cp -pPR lib work/       # OSX dos not support cp -a
#export NEDPATH=.:../lib
#EXTRA_INCLUDES="-I../../../src/sim/parsim -I../../../src/envir -I../../../src/common -I../../../include/platdep"

./opp_test -g $OPT -v $TESTFILES || exit 1
echo
#(cd work; opp_makemake -f --deep --no-deep-includes -i ../makefrag $EXTRA_INCLUDES; $MAKE) || exit 1
#echo
./opp_test -a "-l ../../../../src/inet -n ../../../../src/:. -u Cmdenv" -r $OPT -v $TESTFILES || exit 1
echo
echo Results can be found in ./work
