diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-15 06:47:49 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-15 06:47:49 +0000 |
commit | b9dbd5b5b5ce268e144c113eb0e14552b6d171e5 (patch) | |
tree | cbb91c2aebfb0d00a55b8d846cbea187e20f9feb /llvm | |
parent | d1d6798ee4147515078677f9467ddc5f15986bef (diff) | |
download | bcm5719-llvm-b9dbd5b5b5ce268e144c113eb0e14552b6d171e5.tar.gz bcm5719-llvm-b9dbd5b5b5ce268e144c113eb0e14552b6d171e5.zip |
Make it possible to run this from within subdirectories of llvm/test
llvm-svn: 36052
Diffstat (limited to 'llvm')
-rwxr-xr-x | llvm/test/TestRunner.sh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/llvm/test/TestRunner.sh b/llvm/test/TestRunner.sh index 4e3d190e4ac..04a86bceb18 100755 --- a/llvm/test/TestRunner.sh +++ b/llvm/test/TestRunner.sh @@ -12,4 +12,21 @@ # %llvmgxx - llvm-g++ command # %prcontext - prcontext.tcl script # -make check-one TESTONE=$1 +TESTFILE=$1 +if test `dirname $TESTFILE` == . ; then + TESTPATH=`pwd` + SUBDIR="" + while test `basename $TESTPATH` != "test" -a ! -z "$TESTPATH" ; do + tmp=`basename $TESTPATH` + SUBDIR="$tmp/$SUBDIR" + TESTPATH=`dirname $TESTPATH` + done + if test -d "$TESTPATH" ; then + cd $TESTPATH + make check-one TESTONE="$SUBDIR$TESTFILE" + else + echo "Can't find llvm/test directory in " `pwd` + fi +else + make check-one TESTONE=$TESTFILE +fi |