summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-05-16 17:56:56 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-05-16 17:56:56 +0000
commit99e813eee99c0149d9fbb53a0ae69ae5bfc1e354 (patch)
tree2725ade5701b3e9ff9207f7a6c6c04a6c2388727 /llvm
parent95e2b7b59ef59170cae2668bcf0fdcdf32ca7d7f (diff)
downloadbcm5719-llvm-99e813eee99c0149d9fbb53a0ae69ae5bfc1e354.tar.gz
bcm5719-llvm-99e813eee99c0149d9fbb53a0ae69ae5bfc1e354.zip
Fix PR1355: Only compute the SUBPATH and TESTDIR once.
llvm-svn: 37108
Diffstat (limited to 'llvm')
-rwxr-xr-xllvm/test/TestRunner.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/llvm/test/TestRunner.sh b/llvm/test/TestRunner.sh
index 1fb50cf1c2f..63e4ea7d6be 100755
--- a/llvm/test/TestRunner.sh
+++ b/llvm/test/TestRunner.sh
@@ -11,18 +11,20 @@
# This script is typically used by cd'ing to a test directory and then
# running TestRunner.sh with a list of test file names you want to run.
#
+TESTPATH=`pwd`
+SUBDIR=""
+while test `basename $TESTPATH` != "test" -a ! -z "$TESTPATH" ; do
+ tmp=`basename $TESTPATH`
+ SUBDIR="$tmp/$SUBDIR"
+ TESTPATH=`dirname $TESTPATH`
+done
+
for TESTFILE in "$@" ; do
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"
+ cd $PWD
else
echo "Can't find llvm/test directory in " `pwd`
fi
OpenPOWER on IntegriCloud