[llvm-commits] CVS: llvm/test/TestRunner.sh
Reid Spencer
reid at x10sys.com
Sat Apr 14 23:48:10 PDT 2007
Changes in directory llvm/test:
TestRunner.sh updated: 1.16 -> 1.17
---
Log message:
Make it possible to run this from within subdirectories of llvm/test
---
Diffs of the changes: (+18 -1)
TestRunner.sh | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletion(-)
Index: llvm/test/TestRunner.sh
diff -u llvm/test/TestRunner.sh:1.16 llvm/test/TestRunner.sh:1.17
--- llvm/test/TestRunner.sh:1.16 Sun Apr 15 01:25:12 2007
+++ llvm/test/TestRunner.sh Sun Apr 15 01:47:49 2007
@@ -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
More information about the llvm-commits
mailing list