Correct typo. Should be "not allowed"
[llvm-complete.git] / test / TestRunner.sh
blobd93eda28aab0f4fde899e86894906a3790181f9f
1 #!/bin/sh
3 # TestRunner.sh - This script is used to run the deja-gnu tests exactly like
4 # deja-gnu does, by executing the Tcl script specified in the test case's
5 # RUN: lines. This is made possible by a simple make target supported by the
6 # test/Makefile. All this script does is invoke that make target.
8 # Usage:
9 # TestRunner.sh {script_names}
11 # This script is typically used by cd'ing to a test directory and then
12 # running TestRunner.sh with a list of test file names you want to run.
14 TESTPATH=`pwd`
15 SUBDIR=""
16 if test `dirname $1` == "." ; then
17 while test `basename $TESTPATH` != "test" -a ! -z "$TESTPATH" ; do
18 tmp=`basename $TESTPATH`
19 SUBDIR="$tmp/$SUBDIR"
20 TESTPATH=`dirname $TESTPATH`
21 done
24 for TESTFILE in "$@" ; do
25 if test `dirname $TESTFILE` == . ; then
26 if test -d "$TESTPATH" ; then
27 cd $TESTPATH
28 make check-one TESTONE="$SUBDIR$TESTFILE"
29 cd $PWD
30 else
31 echo "Can't find llvm/test directory in " `pwd`
33 else
34 make check-one TESTONE=$TESTFILE
36 done