summaryrefslogtreecommitdiffstats
path: root/clang/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
commitd8d1b60237d003cbc62a34d0c28ff849c4b9ea69 (patch)
treea249f849242d243919d19c1e1a94554832e7cfd3 /clang/test/TestRunner.sh
parent8eea5b51b50640162d172c29601f1babf38ba510 (diff)
downloadbcm5719-llvm-d8d1b60237d003cbc62a34d0c28ff849c4b9ea69.tar.gz
bcm5719-llvm-d8d1b60237d003cbc62a34d0c28ff849c4b9ea69.zip
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. llvm-svn: 48454
Diffstat (limited to 'clang/test/TestRunner.sh')
-rwxr-xr-xclang/test/TestRunner.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/TestRunner.sh b/clang/test/TestRunner.sh
index b649fab9cc9..9a043e76a77 100755
--- a/clang/test/TestRunner.sh
+++ b/clang/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)
OpenPOWER on IntegriCloud