Pass /p:Platform to msbuild in runtest.cmd.
authorPat Gavlin <pagavlin@microsoft.com>
Thu, 1 Sep 2016 13:09:54 +0000 (06:09 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Thu, 1 Sep 2016 13:09:54 +0000 (06:09 -0700)
Otherwise, the tests will use the ambient setting of the Platform
variable, which might not match the architecture specified on the
command line. This results in the wrong build of the tests running
against the correct runtime, which e.g. causes failures in tests
with native components.

Commit migrated from https://github.com/dotnet/coreclr/commit/d33c89d5af26e7131a069e9227491a1ad7bcae50

src/coreclr/tests/runtest.cmd

index fca99f3..5620789 100644 (file)
@@ -134,7 +134,7 @@ if not defined VSINSTALLDIR (
 ::       The issue is that we extend the build with our own targets which
 ::       means that that rebuilding cannot successfully delete the task
 ::       assembly. 
-set __msbuildCommonArgs=/nologo /nodeReuse:false %__msbuildExtraArgs%
+set __msbuildCommonArgs=/nologo /nodeReuse:false %__msbuildExtraArgs% /p:Platform=%__MSBuildBuildArch%
 
 if not defined __Sequential (
     set __msbuildCommonArgs=%__msbuildCommonArgs% /maxcpucount