summaryrefslogtreecommitdiffstats
path: root/clang/test/TestRunner.sh
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/TestRunner.sh')
-rwxr-xr-xclang/test/TestRunner.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/TestRunner.sh b/clang/test/TestRunner.sh
index 754ab300603..66c1e1eab52 100755
--- a/clang/test/TestRunner.sh
+++ b/clang/test/TestRunner.sh
@@ -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 file resides
# %prcontext - prcontext.tcl script
# %t - temporary file name (derived from testcase name)
#
@@ -15,6 +16,7 @@
FILENAME=$1
TESTNAME=$1
SUBST=$1
+FILEDIR=`dirname $TESTNAME`
OUTPUT=Output/$1.out
@@ -78,6 +80,7 @@ grep 'RUN:' $FILENAME | \
-e "s| clang | $CLANG |g" \
-e "s| clang-cc | $CLANGCC |g" \
-e "s|%s|$SUBST|g" \
+ -e "s|%S|$FILEDIR|g" \
-e "s|%prcontext|prcontext.tcl|g" \
-e "s|%t|$TEMPOUTPUT|g" > $SCRIPT
OpenPOWER on IntegriCloud