projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47d2502
)
Avoid an infinite loop when TestRunner.sh is run outside of the test dir.
author
Reid Spencer
<rspencer@reidspencer.com>
Fri, 18 May 2007 02:06:03 +0000
(
02:06
+0000)
committer
Reid Spencer
<rspencer@reidspencer.com>
Fri, 18 May 2007 02:06:03 +0000
(
02:06
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37201
91177308
-0d34-0410-b5e6-
96231b3b80d8
test/TestRunner.sh
patch
|
blob
|
history
diff --git
a/test/TestRunner.sh
b/test/TestRunner.sh
index 63e4ea7d6be6800233f4a4227db116339aee6bc2..d93eda28aab0f4fde899e86894906a3790181f9f 100755
(executable)
--- a/
test/TestRunner.sh
+++ b/
test/TestRunner.sh
@@
-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