summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEgor Chesakov <Egor.Chesakov@microsoft.com>2019-02-04 18:33:25 -0800
committerEgor Chesakov <Egor.Chesakov@microsoft.com>2019-02-06 12:21:56 -0800
commit834e3fc269a46e1bb81a4782ccb14b83ed13fa05 (patch)
tree5d2b146a7459bc1571556e700fd51079336a771e /tests
parent213da952ee58568f16c21b10ae84cd127154dbaa (diff)
downloadcoreclr-834e3fc269a46e1bb81a4782ccb14b83ed13fa05.tar.gz
coreclr-834e3fc269a46e1bb81a4782ccb14b83ed13fa05.tar.bz2
coreclr-834e3fc269a46e1bb81a4782ccb14b83ed13fa05.zip
Treat $(CLRTestExecutionArguments) as an array in Bash
Diffstat (limited to 'tests')
-rw-r--r--tests/src/CLRTest.Execute.Bash.targets12
-rw-r--r--tests/src/CLRTest.Jit.targets4
2 files changed, 8 insertions, 8 deletions
diff --git a/tests/src/CLRTest.Execute.Bash.targets b/tests/src/CLRTest.Execute.Bash.targets
index 480a31355c..a73f20555c 100644
--- a/tests/src/CLRTest.Execute.Bash.targets
+++ b/tests/src/CLRTest.Execute.Bash.targets
@@ -122,7 +122,7 @@ echo BEGIN EXECUTION]]>
</BashCLRTestExitCodePrep>
<BashCLRTestArgPrep Condition=" '$(CLRTestExecutionArguments)'!='' ">
-<![CDATA[if [ -z ${CLRTestExecutionArguments+x} ]%3B then export CLRTestExecutionArguments='$(CLRTestExecutionArguments)'%3B fi]]>
+<![CDATA[if [ -z ${CLRTestExecutionArguments+x} ]%3B then CLRTestExecutionArguments=($(CLRTestExecutionArguments))%3B fi]]>
</BashCLRTestArgPrep>
<!-- By default, be prepared to do a full check -->
@@ -271,8 +271,8 @@ else
LAUNCHER="$_DebuggerFullPath $(_CLRTestRunFile)"
fi
-echo $LAUNCHER $ExePath $CLRTestExecutionArguments
-$LAUNCHER $ExePath $CLRTestExecutionArguments
+echo $LAUNCHER $ExePath %24(printf "'%s' " "${CLRTestExecutionArguments[@]}")
+$LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
CLRTestExitCode=$?
if [ ! -z ${RunCrossGen+x} ]%3B then
@@ -284,8 +284,8 @@ $(BashLinkerTestCleanupCmds)
$(BashCLRTestLaunchCmds)
echo export CDPATH="$%28dirname "$0")"
export CDPATH="$%28dirname "$0")"
-echo /bin/sh $(InputAssemblyName)
-/bin/sh $(InputAssemblyName)
+echo /usr/bin/env bash $(InputAssemblyName) %24(printf "'%s' " "${CLRTestExecutionArguments[@]}")
+/usr/bin/env bash $(InputAssemblyName) "${CLRTestExecutionArguments[@]}"
CLRTestExitCode=$?
CLRTestExpectedExitCode=0
]]></BashCLRTestLaunchCmds>
@@ -341,7 +341,7 @@ for i in "$@"
%(Command)
%3B%3B')
*)
- CLRTestExecutionArguments="$CLRTestExecutionArguments $i"
+ CLRTestExecutionArguments+=("${i}")
esac
done
diff --git a/tests/src/CLRTest.Jit.targets b/tests/src/CLRTest.Jit.targets
index 61e7155556..b68bed91a2 100644
--- a/tests/src/CLRTest.Jit.targets
+++ b/tests/src/CLRTest.Jit.targets
@@ -115,8 +115,8 @@ fi
<![CDATA[
if [ -z "$DoLink" -a ! -z "$RunningIlasmRoundTrip" ];
then
- echo $(_CLRTestRunFile) $(TargetAssemblyName) $CLRTestExecutionArguments
- $(_CLRTestRunFile) $(TargetAssemblyName) $CLRTestExecutionArguments
+ echo $(_CLRTestRunFile) $(TargetAssemblyName) %24(printf "'%s' " "${CLRTestExecutionArguments[@]}")
+ $(_CLRTestRunFile) $(TargetAssemblyName) "${CLRTestExecutionArguments[@]}"
if [ $? -ne $CLRTestExpectedExitCode ]
then
echo END EXECUTION OF IL{D}ASM BINARY - FAILED $? vs $CLRTestExpectedExitCode