diff options
-rw-r--r-- | eng/pipelines/common/templates/runtimes/build-test-job.yml | 9 | ||||
-rw-r--r-- | eng/pipelines/mono/templates/xplat-pipeline-job.yml | 2 | ||||
-rw-r--r-- | src/tests/build.cmd | 15 | ||||
-rwxr-xr-x | src/tests/build.sh | 14 |
4 files changed, 24 insertions, 16 deletions
diff --git a/eng/pipelines/common/templates/runtimes/build-test-job.yml b/eng/pipelines/common/templates/runtimes/build-test-job.yml index 84cfd8e58ab..b2252563496 100644 --- a/eng/pipelines/common/templates/runtimes/build-test-job.yml +++ b/eng/pipelines/common/templates/runtimes/build-test-job.yml @@ -98,6 +98,13 @@ jobs: - name: compilerArg value: '' + - name: runtimeFlavorArgs + value: '' + + - ${{ if eq(parameters.runtimeFlavor, 'mono') }}: + - name: runtimeFlavorArgs + value: '-excludemonofailures' + steps: # Install test build dependencies @@ -120,7 +127,7 @@ jobs: displayName: Disk Usage before Build # Build managed test components - - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(crossArg) $(priorityArg) ci $(librariesOverrideArg) + - script: $(Build.SourcesDirectory)/src/tests/build$(scriptExt) allTargets skipnative skipgeneratelayout skiptestwrappers $(buildConfig) $(archType) $(runtimeFlavorArgs) $(crossArg) $(priorityArg) ci $(librariesOverrideArg) displayName: Build managed test components - ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}: diff --git a/eng/pipelines/mono/templates/xplat-pipeline-job.yml b/eng/pipelines/mono/templates/xplat-pipeline-job.yml index 9a070492786..0b0ae5a28f6 100644 --- a/eng/pipelines/mono/templates/xplat-pipeline-job.yml +++ b/eng/pipelines/mono/templates/xplat-pipeline-job.yml @@ -73,7 +73,7 @@ jobs: value: '$(binTestsPath)/$(osGroup).$(archType).$(buildConfigUpper)' - name: managedGenericTestArtifactName - value: 'CoreCLRManagedTestArtifacts_AnyOS_AnyCPU_$(buildConfig)' + value: 'MonoManagedTestArtifacts_AnyOS_AnyCPU_$(buildConfig)' - name: microsoftNetSdkIlFolderPath value: '$(Build.SourcesDirectory)/.packages/microsoft.net.sdk.il' diff --git a/src/tests/build.cmd b/src/tests/build.cmd index cb8834ad0b0..453bc09efcb 100644 --- a/src/tests/build.cmd +++ b/src/tests/build.cmd @@ -136,6 +136,12 @@ if "%__TargetsWindows%"=="1" ( set TargetsWindowsMsbuildArg=/p:TargetsWindows=false ) +if "%__Mono%"=="1" ( + set __RuntimeFlavor=mono +) else ( + set __RuntimeFlavor=coreclr +) + @if defined _echo @echo on set __CommonMSBuildArgs=/p:TargetOS=%__TargetOS% /p:Configuration=%__BuildType% /p:TargetArchitecture=%__BuildArch% @@ -353,6 +359,7 @@ for /l %%G in (1, 1, %__NumberOfTestGroups%) do ( set __MSBuildBuildArgs=!__MSBuildBuildArgs! /p:CopyNativeProjectBinaries=!__CopyNativeProjectsAfterCombinedTestBuild! set __MSBuildBuildArgs=!__MSBuildBuildArgs! /p:__SkipPackageRestore=true set __MSBuildBuildArgs=!__MSBuildBuildArgs! !__NativeBinariesLayoutTypeArg! + set __MSBuildBuildArgs=!__MSBuildBuildArgs! /p:RuntimeFlavor=!__RuntimeFlavor! echo Running: msbuild !__MSBuildBuildArgs! !__CommonMSBuildCmdPrefix! !__MSBuildBuildArgs! @@ -476,14 +483,8 @@ set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%" set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%" set __Logging=!__MsbuildLog! !__MsbuildWrn! !__MsbuildErr! -if %%__Mono%%==1 ( - set RuntimeFlavor="mono" -) else ( - set RuntimeFlavor="coreclr" -) - 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 "%__RepoRootDir%\dotnet.cmd" msbuild %__RepoRootDir%\src\tests\run.proj /nodereuse:false /p:BuildWrappers=true /p:TestBuildMode=%__TestBuildMode% !__Logging! %__msbuildArgs% %TargetsWindowsMsbuildArg% %__UnprocessedBuildArgs% /p:RuntimeFlavor=%RuntimeFlavor% +call "%__RepoRootDir%\dotnet.cmd" msbuild %__RepoRootDir%\src\tests\run.proj /nodereuse:false /p:BuildWrappers=true /p:TestBuildMode=%__TestBuildMode% !__Logging! %__msbuildArgs% %TargetsWindowsMsbuildArg% %__UnprocessedBuildArgs% /p:RuntimeFlavor=%__RuntimeFlavor% if errorlevel 1 ( echo %__ErrMsgPrefix%%__MsgPrefix%Error: XUnit wrapper build failed. Refer to the build log files for details: echo %__BuildLog% diff --git a/src/tests/build.sh b/src/tests/build.sh index e5575f69f98..53953f1bb4d 100755 --- a/src/tests/build.sh +++ b/src/tests/build.sh @@ -5,12 +5,6 @@ build_test_wrappers() if [[ "$__BuildTestWrappers" -ne -0 ]]; then echo "${__MsgPrefix}Creating test wrappers..." - if [[ $__Mono -eq 1 ]]; then - __RuntimeFlavor="mono" - else - __RuntimeFlavor="coreclr" - fi - __Exclude="$__RepoRootDir/src/tests/issues.targets" __BuildLogRootName="Tests_XunitWrapper" @@ -274,7 +268,7 @@ build_Tests() if [[ "$__SkipManaged" != 1 ]]; then echo "Starting the Managed Tests Build..." - build_MSBuild_projects "Tests_Managed" "$__RepoRootDir/src/tests/build.proj" "Managed tests build (build tests)" "$__up" + build_MSBuild_projects "Tests_Managed" "$__RepoRootDir/src/tests/build.proj" "Managed tests build (build tests)" "$__up" "/p:RuntimeFlavor=$__RuntimeFlavor" if [[ "$?" -ne 0 ]]; then echo "${__ErrMsgPrefix}${__MsgPrefix}Error: managed test build failed. Refer to the build log files for details (above)" @@ -577,6 +571,12 @@ if [[ "$__CrossBuild" == 1 ]]; then __UnprocessedBuildArgs+=("/p:CrossBuild=true") fi +if [[ $__Mono -eq 1 ]]; then + __RuntimeFlavor="mono" +else + __RuntimeFlavor="coreclr" +fi + # Set dependent variables __LogsDir="$__RootBinDir/log" __MsbuildDebugLogsDir="$__LogsDir/MsbuildDebugLogs" |