Changed TestRunner.sh to dump the output and generated script files in
subdirectories mirroring where the test case file is located

For example, for the test case "Sema/stmt_exprs.c", instead of the files
"Output/stmt_exprs.c.out" and "Output/stmt_exprs.c.out.script" being created, the
files "Output/Sema/stmt_exprs.c.out" and "Output/Sema/stmt_exprs.c.out.script" are
created. This prevents any collisions from different test directories that have the
same file name for a test case, and also makes it clear where the test case was
drawn from.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44410 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/TestRunner.sh b/test/TestRunner.sh
index 2c96fd5..07a4989 100755
--- a/test/TestRunner.sh
+++ b/test/TestRunner.sh
@@ -16,11 +16,11 @@
 FILENAME=$1
 TESTNAME=$1
 SUBST=$1
-FILENAME_ONLY=`basename $1`
-OUTPUT=Output/$FILENAME_ONLY.out
+
+OUTPUT=Output/$1.out
 
 # create the output directory if it does not already exist
-mkdir Output > /dev/null 2>&1
+mkdir -p `dirname $OUTPUT` > /dev/null 2>&1
 
 if test $# != 1; then
   # If more than one parameter is passed in, there must be three parameters: