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 | 4142579814bfe083a1bd8a35e35823af170f0aed (patch) | |
tree | d01d55e429699204490c1cb02cb9863f1c5f598e /test/TestRunner.sh | |
parent | c92e6a690c3d59b93cf7038122b598c9072fae76 (diff) |
Make it possible to run this from within subdirectories of llvm/test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/TestRunner.sh')
-rwxr-xr-x | test/TestRunner.sh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/TestRunner.sh b/test/TestRunner.sh index 4e3d190e4a..04a86bceb1 100755 --- a/test/TestRunner.sh +++ b/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 |