3 # TestRunner.sh - This script is used to run arbitrary unit tests. Unit
4 # tests must contain the command used to run them in the input file, starting
5 # immediately after a "RUN:" string.
7 # This runner recognizes and replaces the following strings in the command:
9 # %s - Replaced with the input name of the program, or the program to
10 # execute, as appropriate.
11 # %llvmgcc - llvm-gcc command
12 # %llvmgxx - llvm-g++ command
13 # %prcontext - prcontext.tcl script
16 if test `dirname $TESTFILE` == . ; then
19 while test `basename $TESTPATH` != "test" -a ! -z "$TESTPATH" ; do
20 tmp=`basename $TESTPATH`
22 TESTPATH=`dirname $TESTPATH`
24 if test -d "$TESTPATH" ; then
26 make check-one TESTONE="$SUBDIR$TESTFILE"
28 echo "Can't find llvm/test directory in " `pwd`
31 make check-one TESTONE=$TESTFILE