Support %S in Python TestRunner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68814 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/test/TestRunner.py b/utils/test/TestRunner.py
index 6212f35..1cb8b9d 100755
--- a/utils/test/TestRunner.py
+++ b/utils/test/TestRunner.py
@@ -8,6 +8,7 @@
#
# %s - Replaced with the input name of the program, or the program to
# execute, as appropriate.
+# %S - Replaced with the directory where the input resides.
# %llvmgcc - llvm-gcc command
# %llvmgxx - llvm-g++ command
# %prcontext - prcontext.tcl script
@@ -103,6 +104,7 @@
TEMPOUTPUT = OUTPUT + '.tmp'
substitutions = [('%s',SUBST),
+ ('%S',os.path.dirname(SUBST)),
('%llvmgcc','llvm-gcc -emit-llvm -w'),
('%llvmgxx','llvm-g++ -emit-llvm -w'),
('%prcontext','prcontext.tcl'),