[llvm-commits] CVS: llvm/test/TestRunner.sh
Reid Spencer
reid at x10sys.com
Thu May 17 19:06:21 PDT 2007
Changes in directory llvm/test:
TestRunner.sh updated: 1.19 -> 1.20
---
Log message:
Avoid an infinite loop when TestRunner.sh is run outside of the test dir.
---
Diffs of the changes: (+7 -5)
TestRunner.sh | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
Index: llvm/test/TestRunner.sh
diff -u llvm/test/TestRunner.sh:1.19 llvm/test/TestRunner.sh:1.20
--- llvm/test/TestRunner.sh:1.19 Wed May 16 12:56:56 2007
+++ llvm/test/TestRunner.sh Thu May 17 21:06:03 2007
@@ -13,11 +13,13 @@
#
TESTPATH=`pwd`
SUBDIR=""
-while test `basename $TESTPATH` != "test" -a ! -z "$TESTPATH" ; do
- tmp=`basename $TESTPATH`
- SUBDIR="$tmp/$SUBDIR"
- TESTPATH=`dirname $TESTPATH`
-done
+if test `dirname $1` == "." ; then
+ while test `basename $TESTPATH` != "test" -a ! -z "$TESTPATH" ; do
+ tmp=`basename $TESTPATH`
+ SUBDIR="$tmp/$SUBDIR"
+ TESTPATH=`dirname $TESTPATH`
+ done
+fi
for TESTFILE in "$@" ; do
if test `dirname $TESTFILE` == . ; then
More information about the llvm-commits
mailing list