summaryrefslogtreecommitdiffstats
path: root/test/TestRunner.sh
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2008-03-17 13:45:47 +0000
committerGabor Greif <ggreif@gmail.com>2008-03-17 13:45:47 +0000
commit0f23303f48af540777a3324fd04d63d13a9d3d2a (patch)
treee5f27a73e450895bd2e319f2b6ffc08be663ffa6 /test/TestRunner.sh
parent5ca1b5a8e5541be14ef9d2be156016565f421c51 (diff)
Actually expand the %t1 patterns (in RUN: lines) to a unique
filename. This fixes (e.g.) CodeGen/struct-x86-darwin.c which raced at writing to "%t1" with other tests when parallel testing was specified with a high "-j XX" value. Also gets rid of the file tools/clang/test/%t1 when doing an "svn st" after testing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48454 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/TestRunner.sh')
-rwxr-xr-xtest/TestRunner.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/TestRunner.sh b/test/TestRunner.sh
index b649fab9cc..9a043e76a7 100755
--- a/test/TestRunner.sh
+++ b/test/TestRunner.sh
@@ -11,6 +11,7 @@
# %llvmgcc - llvm-gcc command
# %llvmgxx - llvm-g++ command
# %prcontext - prcontext.tcl script
+# %t1 - temporary file name (derived from testcase name)
#
FILENAME=$1
@@ -40,7 +41,8 @@ grep -q 'RUN:' $FILENAME || (
)
SCRIPT=$OUTPUT.script
-grep 'RUN:' $FILENAME | sed "s|^.*RUN:\(.*\)$|\1|g;s|%s|$SUBST|g;s|%llvmgcc|llvm-gcc -emit-llvm|g;s|%llvmgxx|llvm-g++ -emit-llvm|g;s|%prcontext|prcontext.tcl|g" > $SCRIPT
+TEMPOUTPUT=$OUTPUT.tmp
+grep 'RUN:' $FILENAME | sed "s|^.*RUN:\(.*\)$|\1|g;s|%s|$SUBST|g;s|%llvmgcc|llvm-gcc -emit-llvm|g;s|%llvmgxx|llvm-g++ -emit-llvm|g;s|%prcontext|prcontext.tcl|g;s|%t1|$TEMPOUTPUT|g" > $SCRIPT
grep -q XFAIL $FILENAME && (printf "XFAILED '$TESTNAME': "; grep XFAIL $FILENAME)