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
diff --git a/test/TestRunner.sh b/test/TestRunner.sh
index b649fab..9a043e7 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 @@
 )
 
 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)