From d9b37dc6202252f3d1153c7fb392447209bfb920 Mon Sep 17 00:00:00 2001 From: Aaron R Robinson Date: Mon, 6 Aug 2018 16:25:24 -0700 Subject: [PATCH 1/2] Revert "Revert "Build managed tests with dotnet (#19254)"" This reverts commit c8480f5058ddaf203460befc6b8f8f26daa36ba0. --- build-test.cmd | 9 ++++++--- tests/build.proj | 4 ++-- tests/dir.sdkbuild.props | 1 + tests/src/dir.props | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/build-test.cmd b/build-test.cmd index 38c97b59d035..b278996676f6 100644 --- a/build-test.cmd +++ b/build-test.cmd @@ -104,7 +104,10 @@ if [!processedArgs!]==[] ( :ArgsDone @REM Special handling for -priority=N argument. -if %__Priority% GTR 0 (set "__PriorityArg=-priority=%__Priority%") +if %__Priority% GTR 0 ( + set "__PriorityArg=-priority=%__Priority%" + set "__PriorityMsbuildArg=/p:priority=%__Priority%" +) if defined __BuildAgainstPackagesArg ( if not defined __RuntimeID ( @@ -117,7 +120,7 @@ if defined __BuildAgainstPackagesArg ( set __RunArgs=-BuildOS=%__BuildOS% -BuildType=%__BuildType% -BuildArch=%__BuildArch% REM As we move from buildtools to arcade, __RunArgs should be replaced with __msbuildArgs -set __msbuildArgs=/p:__BuildOS=%__BuildOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% +set __msbuildArgs=/p:__BuildOS=%__BuildOS% /p:__BuildType=%__BuildType% /p:__BuildArch=%__BuildArch% /nologo /verbosity:minimal /clp:Summary echo %__MsgPrefix%Commencing CoreCLR repo test build @@ -299,7 +302,7 @@ for /l %%G in (1, 1, %__BuildLoopCount%) do ( set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%";Append=!__AppendToLog! set TestBuildSlice=%%G - call "%__ProjectDir%\run.cmd" build -Project=%__ProjectDir%\tests\build.proj -MsBuildLog=!__msbuildLog! -MsBuildWrn=!__msbuildWrn! -MsBuildErr=!__msbuildErr! %__RunArgs% %__BuildAgainstPackagesArg% %__PriorityArg% %__PassThroughArg% %__unprocessedBuildArgs% + call %__DotnetHost% msbuild %__ProjectDir%\tests\build.proj !__msbuildLog! !__msbuildWrn! !__msbuildErr! %__msbuildArgs% %__BuildAgainstPackagesMsbuildArg% %__PriorityMsbuildArg% %__PassThroughArg% %__unprocessedBuildArgs% if errorlevel 1 ( echo %__MsgPrefix%Error: build failed. Refer to the build log files for details: diff --git a/tests/build.proj b/tests/build.proj index a421b130b605..6bdc8690bfa0 100644 --- a/tests/build.proj +++ b/tests/build.proj @@ -51,8 +51,8 @@ - - + + diff --git a/tests/dir.sdkbuild.props b/tests/dir.sdkbuild.props index c4cc31ec9f90..bc5bed9b3fbf 100644 --- a/tests/dir.sdkbuild.props +++ b/tests/dir.sdkbuild.props @@ -10,6 +10,7 @@ $(MicrosoftNETCoreAppPackageVersion) false false + AnyCPU 99.0 diff --git a/tests/src/dir.props b/tests/src/dir.props index 27300734357f..c5cc702882df 100644 --- a/tests/src/dir.props +++ b/tests/src/dir.props @@ -1,7 +1,7 @@ - + @@ -37,7 +37,7 @@ $(__TestRootDir) $(BaseOutputPath)\$(OSPlatformConfig)\ $(BaseOutputPathWithConfig) - $(ProjectDir)\..\bin\tests\obj\$(OSPlatformConfig)\Managed\ + $(ProjectDir)..\bin\tests\obj\$(OSPlatformConfig)\Managed\ $(__ManagedTestIntermediatesDir)\ <__NativeTestIntermediatesDir Condition="'$(__NativeTestIntermediatesDir)' == ''">$([System.IO.Path]::GetFullPath($(BaseOutputPathWithConfig)..\obj\$(BuildOS).$(Platform).$(Configuration)\Native\)) $(MSBuildProjectName)\ From 0418137fd2482d624e69174970f58967a01335c8 Mon Sep 17 00:00:00 2001 From: Aaron R Robinson Date: Mon, 6 Aug 2018 19:53:52 -0700 Subject: [PATCH 2/2] Reenable MSBuild support through dotnet instead of global MSBuild --- build-test.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-test.cmd b/build-test.cmd index b278996676f6..7edc3769f8f2 100644 --- a/build-test.cmd +++ b/build-test.cmd @@ -106,7 +106,7 @@ if [!processedArgs!]==[] ( @REM Special handling for -priority=N argument. if %__Priority% GTR 0 ( set "__PriorityArg=-priority=%__Priority%" - set "__PriorityMsbuildArg=/p:priority=%__Priority%" + set "__PriorityMsbuildArg=/p:CLRTestPriorityToBuild=%__Priority%" ) if defined __BuildAgainstPackagesArg ( @@ -302,7 +302,7 @@ for /l %%G in (1, 1, %__BuildLoopCount%) do ( set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%";Append=!__AppendToLog! set TestBuildSlice=%%G - call %__DotnetHost% msbuild %__ProjectDir%\tests\build.proj !__msbuildLog! !__msbuildWrn! !__msbuildErr! %__msbuildArgs% %__BuildAgainstPackagesMsbuildArg% %__PriorityMsbuildArg% %__PassThroughArg% %__unprocessedBuildArgs% + call %__DotnetHost% msbuild %__ProjectDir%\tests\build.proj !__msbuildLog! !__msbuildWrn! !__msbuildErr! %__msbuildArgs% %__BuildAgainstPackagesMsbuildArg% !__PriorityMsbuildArg! %__PassThroughArg% %__unprocessedBuildArgs% if errorlevel 1 ( echo %__MsgPrefix%Error: build failed. Refer to the build log files for details: