forked from OSchip/llvm-project
Avoid an infinite loop when TestRunner.sh is run outside of the test dir.
llvm-svn: 37201
This commit is contained in:
parent
478b805956
commit
d266c18c0e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue