Skip to content

Commit

Permalink
Remove run.exe and config.json (dotnet/coreclr#21608)
Browse files Browse the repository at this point in the history
This moves us one step away from buildtools and towards arcade.

This replaces run.sh and run.cmd (and all invocations) with "dotnet.sh msbuild" and "msbuild.cmd".
- I'm using these wrapper scripts for now instead of those in eng/common in order to retain the very helpful "Running <command>" output in the build logs.
- I'm using msbuild.cmd instead of dotnet.sh to match the current behavior that uses desktop msbuild on windows, instead of dotnet.

All of the arguments that used to be implicitly generated by run.exe and config.json are now explicit, resulting in longer (but easier to copy+paste) commands. Some of these arguments are likely unnecessary, but in this change my goal is just to match the run.exe behavior. Later, I would like to go through and clean up parameters that don't need to be passed in every invocation. I might also consider moving more of the common arguments out into variables in a later change.

Some of the wrapper scripts now have limited support for parsing "-Argument=Value" style parameters, to support our existing buildpipeline infrastructure, since I thought this was easier to test than changing our buildpipeline definitions. We can remove that parsing logic once we stop using buildpipeline (which has happened at this point).

Some subtle parts of the change:

* Add msbuild.cmd

This simulates the behavior of Tools\msbuild.cmd, which calls desktop msbuild.

* Fix BuildOS processing in package build and publish

Previously, config.json had its own processing that would set
OSName. Instead, we now pass it in explicitly where it's
needed (building packages), or not at all (publishing them).

* Handle "=" in publish-packages.cmd and other scripts

This seems necessary to properly handle the azure access token

* Set __BuildOS in PublishPackages

Required for cases where the build OS isn't detected during the build
such as freebsd.

* Use dotnet msbuild in runtest.py

This prevents us from having to deal with different quote escape
behavior on windows and linux. Previously, arguments like
fileloggerparameters and the logger were given quotes to escape
semicolons in the argument. On unix, this prevented the argument from
being split up by bash. On windows, it seems that the run.cmd/run.exe
tools would prevent the extra quotes from being passed to
msbuild.exe (desktop msbuild would choke on the quotes if they were
passed along).

Unlike desktop msbuild, dotnet msbuild is able to parse the quoted
strings, so we simply psas the quoted arguments directly to it on
windows. We may be able to do the same on unix.

* Fix build-test.sh problem with BuildOS

When copying native files during the unix test build, we rely on
__BuildOS being set. Fixing the import order and always setting
__BuildOS fixes this. We should eventually fix the inconsistent use of
BuildOS vs __BuildOS.


Commit migrated from dotnet/coreclr@1b43bd8
  • Loading branch information
sbomer authored Jan 31, 2019
1 parent 44f5177 commit 202ad36
Show file tree
Hide file tree
Showing 20 changed files with 507 additions and 979 deletions.
8 changes: 7 additions & 1 deletion src/coreclr/UpdatePublishedVersions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ param(
# A pattern matching all packages in the set that the versions repository should be set to.
[Parameter(Mandatory=$true)][string]$nupkgPath)

& "$PSScriptRoot\run.cmd" build -- tests\build.proj /t:UpdatePublishedVersions `
& "$PSScriptRoot\msbuild.cmd" /nologo /verbosity:minimal /clp:Summary /nodeReuse:false `
/l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log `
/p:RestoreDefaultOptimizationDataPackage=false `
/p:PortableBuild=true `
/p:UsePartialNGENOptimization=false `
/maxcpucount `
tests\build.proj /t:UpdatePublishedVersions `
/p:GitHubUser="$gitHubUser" `
/p:GitHubEmail="$gitHubEmail" `
/p:GitHubAuthToken="$gitHubAuthToken" `
Expand Down
34 changes: 32 additions & 2 deletions src/coreclr/build-packages.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,42 @@
setlocal EnableDelayedExpansion

set "__ProjectDir=%~dp0"
set allargs=%*

set "__args=%*"
set processedArgs=
set unprocessedArgs=
set __MSBuildArgs=

:Arg_Loop
if "%1" == "" goto ArgsDone
if /I [%1] == [/?] goto Usage
if /I [%1] == [/help] goto Usage

call %__ProjectDir%/run.cmd build-packages -Project=%__ProjectDir%\src\.nuget\packages.builds -FilterToOSGroup=Windows_NT %allargs%
REM CMD eats "=" on the argument list.
REM TODO: remove all -Property=Value type arguments here once we get rid of them in buildpipeline.
if /i "%1" == "-BuildArch" (set processedArgs=!processedArgs! %1=%2&set __MSBuildArgs=!__MSBuildArgs! /p:__BuildArch=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "-BuildType" (set processedArgs=!processedArgs! %1=%2&set __MSBuildArgs=!__MSBuildArgs! /p:__BuildType=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "-OfficialBuildId" (set processedArgs=!processedArgs! %1=%2&set __MSBuildArgs=!__MSBuildArgs! /p:OfficialBuildId=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "--" (set processedArgs=!processedArgs! %1&shift)

REM handle any unprocessed arguments, assumed to go only after the processed arguments above
if [!processedArgs!]==[] (
set unprocessedArgs=%__args%
) else (
set unprocessedArgs=%__args%
for %%t in (!processedArgs!) do (
REM strip out already-processed arguments from unprocessedArgs
set unprocessedArgs=!unprocessedArgs:*%%t=!
)
)

:ArgsDone

call %__ProjectDir%/msbuild.cmd /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^
/p:__BuildOS=Windows_NT /flp:v=detailed;Append;LogFile=build-packages.log^
/l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^
/p:PortableBuild=true %__ProjectDir%\src\.nuget\packages.builds^
/p:FilterToOSGroup=Windows_NT %__MSBuildArgs% %unprocessedArgs%
if NOT [!ERRORLEVEL!]==[0] (
echo ERROR: An error occurred while building packages, see build-packages.log for more details.
exit /b 1
Expand Down
41 changes: 31 additions & 10 deletions src/coreclr/build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,29 +87,45 @@ case $OSName in
;;
esac

buildArgs=
unprocessedBuildArgs=

# TODO: get rid of argument processing entirely once we remove the
# uses of -Arg=Value style in buildpipeline.
while :; do
if [ $# -le 0 ]; then
break
fi

case "$1" in
-\?|-h|--help)
usage
exit 1
;;
usage
exit 1
;;
-BuildArch=*)
unprocessedBuildArgs="$unprocessedBuildArgs $1"
__Arch=$(echo $1| cut -d'=' -f 2)
;;

__Arch=$(echo $1| cut -d'=' -f 2)
buildArgs="$buildArgs /p:__BuildArch=$__Arch"
;;
-BuildType=*)
__Type=$(echo $1| cut -d'=' -f 2)
buildArgs="$buildArgs /p:__BuildType=$__Type"
;;
-OfficialBuildId=*)
__Id=$(echo $1| cut -d'=' -f 2)
buildArgs="$buildArgs /p:OfficialBuildId=$__Id"
;;
-__DoCrossArchBuild=*)
__CrossBuild=$(echo $1| cut -d'=' -f 2)
buildArgs="$buildArgs /p:__DoCrossArchBuild=$__CrossBuild"
;;
-portablebuild=false)
unprocessedBuildArgs="$unprocessedBuildArgs $1"
buildArgs="$buildArgs /p:PortableBuild=false"
__IsPortableBuild=0
;;
--)
;;
*)
unprocessedBuildArgs="$unprocessedBuildArgs $1"
unprocessedBuildArgs="$unprocessedBuildArgs $1"
esac
shift
done
Expand All @@ -129,7 +145,12 @@ else
export __DistroRid="$__HostDistroRid"
fi

$__ProjectRoot/run.sh build-packages -Project=$__ProjectRoot/src/.nuget/packages.builds -DistroRid=$__DistroRid -UseSharedCompilation=false -BuildNugetPackage=false -MsBuildEventLogging="/l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log" $unprocessedBuildArgs
$__ProjectRoot/dotnet.sh msbuild /nologo /verbosity:minimal /clp:Summary \
/p:__BuildOS=$__BuildOS /flp:v=detailed\;Append\;LogFile=build-packages.log \
/l:BinClashLogger,Tools/Microsoft.DotNet.Build.Tasks.dll\;LogFile=binclash.log \
/p:PortableBuild=true src/.nuget/packages.builds \
/p:__DistroRid=$__DistroRid /p:UseSharedCompilation=false /p:BuildNugetPackage=false \
$buildArgs $unprocessedBuildArgs
if [ $? -ne 0 ]
then
echo "ERROR: An error occurred while building packages; See build-packages.log for more details."
Expand Down
77 changes: 52 additions & 25 deletions src/coreclr/build-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ REM __UnprocessedBuildArgs are args that we pass to msbuild (e.g. /p:__BuildArch
set "__args= %*"
set processedArgs=
set __UnprocessedBuildArgs=
set __RunArgs=
set __CommonMSBuildArgs=

set __BuildAgainstPackagesArg=
set __BuildAgainstPackagesMsbuildArg=
set __SkipRestorePackages=
set __SkipManaged=
set __SkipNative=
Expand All @@ -62,7 +61,6 @@ set __DoCrossgen=
@REM and allow the "-priority=1" syntax.
set __Priority=0
set __PriorityArg=
set __PassThroughArg=

:Arg_Loop
if "%1" == "" goto ArgsDone
Expand All @@ -87,15 +85,15 @@ if /i "%1" == "checked" (set __BuildType=Checked&set processedArgs
if /i "%1" == "skipmanaged" (set __SkipManaged=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "skipnative" (set __SkipNative=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "buildtesthostonly" (set __SkipNative=1&set __SkipManaged=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "buildagainstpackages" (set __ZipTests=1&set __BuildAgainstPackagesArg=-BuildTestsAgainstPackages&set __BuildAgainstPackagesMsbuildArg=/p:BuildTestsAgainstPackages=true&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "buildagainstpackages" (set __ZipTests=1&set __BuildAgainstPackagesArg=/p:BuildTestsAgainstPackages=true&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "skiprestorepackages" (set __SkipRestorePackages=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "ziptests" (set __ZipTests=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "crossgen" (set __DoCrossgen=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "runtimeid" (set __RuntimeId=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
if /i "%1" == "targetsNonWindows" (set __TargetsWindows=0&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "Exclude" (set __Exclude=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
if /i "%1" == "-priority" (set __Priority=%2&shift&set processedArgs=!processedArgs! %1=%2&shift&goto Arg_Loop)
if /i "%1" == "--" (set __PassThroughArg=%1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
if /i "%1" == "--" (set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)

if [!processedArgs!]==[] (
set __UnprocessedBuildArgs=%__args%
Expand All @@ -110,8 +108,7 @@ if [!processedArgs!]==[] (

@REM Special handling for -priority=N argument.
if %__Priority% GTR 0 (
set "__PriorityArg=-priority=%__Priority%"
set "__PriorityMsbuildArg=/p:CLRTestPriorityToBuild=%__Priority%"
set "__PriorityArg=/p:CLRTestPriorityToBuild=%__Priority%"
)

if defined __BuildAgainstPackagesArg (
Expand All @@ -133,7 +130,7 @@ if "%__TargetsWindows%"=="1" (

@if defined _echo @echo on

set __RunArgs=-BuildOS=%__BuildOS% -BuildType=%__BuildType% -BuildArch=%__BuildArch%
set __CommonMSBuildArgs=/p:__BuildOS=%__BuildOS% /p:__BuildType=%__BuildType% /p:__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% /nologo /verbosity:minimal /clp:Summary /maxcpucount

Expand Down Expand Up @@ -235,9 +232,14 @@ set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__B
set __MsbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
set __Logging=-MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr!
set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr!

call "%__ProjectDir%\run.cmd" build -Project="%__NativeTestIntermediatesDir%\install.vcxproj" !__Logging! -configuration=%__BuildType% -platform=%__BuildArch% %__RunArgs% %__PriorityArg% %__PassThroughArg% %__UnprocessedBuildArgs%
call "%__ProjectDir%\msbuild.cmd" /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^
/l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
/p:UsePartialNGENOptimization=false /maxcpucount^
"%__NativeTestIntermediatesDir%\install.vcxproj"^
!__Logging! /p:Configuration=%__BuildType% /p:Platform=%__BuildArch% %__CommonMSBuildArgs% %__PriorityArg% %__UnprocessedBuildArgs%
if errorlevel 1 (
echo %__MsgPrefix%Error: build failed. Refer to the build log files for details:
echo %__BuildLog%
Expand Down Expand Up @@ -268,9 +270,14 @@ set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__B
set __MsbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
set __Logging=-MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr!
set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr!

call "%__ProjectDir%\run.cmd" build -Project=%__ProjectDir%\tests\build.proj -BatchRestorePackages !__Logging! %__RunArgs% %__BuildAgainstPackagesArg% %__PriorityArg% %__PassThroughArg% %__UnprocessedBuildArgs%
call "%__ProjectDir%\msbuild.cmd" /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^
/l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
/p:UsePartialNGENOptimization=false /maxcpucount^
%__ProjectDir%\tests\build.proj /t:BatchRestorePackages^
!__Logging! %__CommonMSBuildArgs% %__BuildAgainstPackagesArg% %__PriorityArg% %__UnprocessedBuildArgs%

if not defined __BuildAgainstPackagesArg goto SkipRestoreProduct

Expand All @@ -283,9 +290,14 @@ set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__B
set __MsbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
set __Logging=-MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr!
set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr!

call "%__ProjectDir%\run.cmd" build -Project=%__ProjectDir%\tests\runtest.proj -BinPlaceRef -BinPlaceProduct -CopyCrossgenToProduct -RuntimeId="%__RuntimeId%" !__Logging! %__RunArgs% %__BuildAgainstPackagesArg% %__PriorityArg% %__PassThroughArg% %__UnprocessedBuildArgs%
call "%__ProjectDir%\msbuild.cmd" /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^
/l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
/p:UsePartialNGENOptimization=false /maxcpucount^
%__Projectdir%\tests\runtest.proj /t:BinPlaceRef /t:BinPlaceProduct /t:CopyCrossgenToProduct /p:RuntimeId="%__RuntimeId%"^
!__Logging! %__CommonMSBuildArgs% %__BuildAgainstPackagesArg% %__PriorityArg% %__UnprocessedBuildArgs%
if errorlevel 1 (
echo %__MsgPrefix%Error: BinPlace of mscorlib.dll failed. Refer to the build log files for details:
echo %__BuildLog%
Expand Down Expand Up @@ -334,9 +346,9 @@ for /l %%G in (1, 1, %__BuildLoopCount%) do (
set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%";Append=!__AppendToLog!

set TestBuildSlice=%%G
echo Running: msbuild %__ProjectDir%\tests\build.proj !__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! %TargetsWindowsMsbuildArg% %__msbuildArgs% %__BuildAgainstPackagesMsbuildArg% !__PriorityMsbuildArg! %__UnprocessedBuildArgs%
echo Running: msbuild %__ProjectDir%\tests\build.proj !__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! %TargetsWindowsMsbuildArg% %__msbuildArgs% %__BuildAgainstPackagesArg% !__PriorityArg! %__UnprocessedBuildArgs%

call msbuild %__ProjectDir%\tests\build.proj !__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! %TargetsWindowsMsbuildArg% %__msbuildArgs% %__BuildAgainstPackagesMsbuildArg% !__PriorityMsbuildArg! %__UnprocessedBuildArgs%
call msbuild %__ProjectDir%\tests\build.proj !__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! %TargetsWindowsMsbuildArg% %__msbuildArgs% %__BuildAgainstPackagesArg% !__PriorityArg! %__UnprocessedBuildArgs%

if errorlevel 1 (
echo %__MsgPrefix%Error: build failed. Refer to the build log files for details:
Expand Down Expand Up @@ -409,7 +421,7 @@ echo %__MsgPrefix%Creating test overlay

set RuntimeIdArg=
if defined __RuntimeId (
set RuntimeIdArg=-RuntimeID="%__RuntimeId%"
set RuntimeIdArg=/p:RuntimeId="%__RuntimeId%"
)

set __BuildLogRootName=Tests_Overlay_Managed
Expand All @@ -419,9 +431,14 @@ set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__B
set __MsbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
set __Logging=-MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr!
set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr!

call %__ProjectDir%\run.cmd build -Project=%__ProjectDir%\tests\runtest.proj -testOverlay !__Logging! %__RunArgs% %RuntimeIdArg% %__PriorityArg% %__PassThroughArg% %__UnprocessedBuildArgs%
call %__ProjectDir%\msbuild.cmd /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^
/l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
/p:UsePartialNGENOptimization=false /maxcpucount^
%__ProjectDir%\tests\runtest.proj /t:CreateTestOverlay^
!__Logging! %__CommonMSBuildArgs% %RuntimeIdArg% %__PriorityArg% %__UnprocessedBuildArgs%
if errorlevel 1 (
echo %__MsgPrefix%Error: build failed. Refer to the build log files for details:
echo %__BuildLog%
Expand All @@ -448,9 +465,14 @@ set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__B
set __MsbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
set __Logging=-MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr!
set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr!

call %__ProjectDir%\run.cmd build -Project=%__ProjectDir%\tests\runtest.proj -testHost !__Logging! %__RunArgs% %RuntimeIdArg% %__PriorityArg% %__PassThroughArg% %__UnprocessedBuildArgs%
call %__ProjectDir%\msbuild.cmd /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^
/l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
/p:UsePartialNGENOptimization=false /maxcpucount^
%__ProjectDir%\tests\runtest.proj /t:CreateTestHost^
!__Logging! %__CommonMSBuildArgs% %RuntimeIdArg% %__PriorityArg% %__UnprocessedBuildArgs%
if errorlevel 1 (
echo %__MsgPrefix%Error: build failed. Refer to the build log files for details:
echo %__BuildLog%
Expand Down Expand Up @@ -479,7 +501,7 @@ set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr!

REM Build wrappers using the local SDK's msbuild. As we move to arcade, the other builds should be moved away from run.exe as well.
call %DotNetCli% msbuild %__ProjectDir%\tests\runtest.proj /p:RestoreAdditionalProjectSources=https://dotnet.myget.org/F/dotnet-core/ /p:BuildWrappers=true !__Logging! %__msbuildArgs% %TargetsWindowsMsbuildArg% %__BuildAgainstPackagesMsbuildArg% %__UnprocessedBuildArgs%
call %DotNetCli% msbuild %__ProjectDir%\tests\runtest.proj /p:RestoreAdditionalProjectSources=https://dotnet.myget.org/F/dotnet-core/ /p:BuildWrappers=true !__Logging! %__msbuildArgs% %TargetsWindowsMsbuildArg% %__BuildAgainstPackagesArg% %__UnprocessedBuildArgs%
if errorlevel 1 (
echo %__MsgPrefix%Error: Xunit wrapper build failed. Refer to the build log files for details:
echo %__BuildLog%
Expand All @@ -500,7 +522,7 @@ REM ============================================================================

set __CrossgenArg = ""
if defined __DoCrossgen (
set __CrossgenArg="-Crossgen"
set __CrossgenArg="/p:Crossgen=true"
if "%__TargetsWindows%" == "1" (
echo %__MsgPrefix%Running crossgen on framework assemblies
call :PrecompileFX
Expand Down Expand Up @@ -528,9 +550,14 @@ set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__B
set __MsbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
set __Logging=-MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr!
set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr!

call %__ProjectDir%\run.cmd build -Project=%__ProjectDir%\tests\helixprep.proj !__Logging! %__RunArgs% %RuntimeIdArg% %TargetsWindowsArg% %__CrossgenArg% %__PriorityArg% %__PassThroughArg% %__UnprocessedBuildArgs%
call %__ProjectDir%\msbuild.cmd /nologo /verbosity:minimal /clp:Summary /nodeReuse:false^
/l:BinClashLogger,Tools/net46/Microsoft.DotNet.Build.Tasks.dll;LogFile=binclash.log^
/p:RestoreDefaultOptimizationDataPackage=false /p:PortableBuild=true^
/p:UsePartialNGENOptimization=false /maxcpucount^
%__ProjectDir%\tests\helixprep.proj^
!__Logging! %__CommonMSBuildArgs% %RuntimeIdArg% %TargetsWindowsMSBuildArg% %__CrossgenArg% %__PriorityArg% %__UnprocessedBuildArgs%
if errorlevel 1 (
echo %__MsgPrefix%Error: build failed. Refer to the build log files for details:
echo %__BuildLog%
Expand Down
Loading

0 comments on commit 202ad36

Please sign in to comment.