Run tests by default and again enable them in UB (#19366)
This commit is contained in:
parent
226c8fbd20
commit
52d8d05dff
3 changed files with 62 additions and 25 deletions
|
@ -69,7 +69,7 @@ parameters:
|
|||
|
||||
- name: runTests
|
||||
type: boolean
|
||||
default: false
|
||||
default: true
|
||||
|
||||
# Freeform field for extra values to pass to build.sh for special build modes
|
||||
- name: extraProperties
|
||||
|
@ -243,7 +243,7 @@ jobs:
|
|||
|
||||
- ${{ if eq(parameters.runTests, 'True') }}:
|
||||
- script: |
|
||||
call $(sourcesPath)\build.cmd -ci -prepareMachine -test ${{ parameters.extraProperties }}
|
||||
call $(sourcesPath)\build.cmd -ci -prepareMachine -test /p:TargetOS=${{ parameters.targetOS }} /p:TargetArchitecture=${{ parameters.targetArchitecture }} ${{ parameters.extraProperties }}
|
||||
displayName: Run Tests
|
||||
|
||||
- ${{ else }}:
|
||||
|
@ -355,20 +355,39 @@ jobs:
|
|||
fi
|
||||
displayName: Build
|
||||
|
||||
# Only run tests if enabled
|
||||
- ${{ if eq(parameters.runTests, 'True') }}:
|
||||
- script: |
|
||||
set -ex
|
||||
# Only run tests if enabled
|
||||
- ${{ if eq(parameters.runTests, 'True') }}:
|
||||
- script: |
|
||||
set -ex
|
||||
|
||||
dockerVolumeArgs="-v $(sourcesPath):/vmr"
|
||||
poisonArg=''
|
||||
dockerVolumeArgs="-v $(sourcesPath):/vmr"
|
||||
sourceOnlyArgs=''
|
||||
extraBuildProperties=''
|
||||
|
||||
if [[ '${{ parameters.enablePoison }}' == 'True' ]]; then
|
||||
poisonArg='--poison'
|
||||
fi
|
||||
if [[ ! -z '${{ parameters.targetOS }}' ]]; then
|
||||
extraBuildProperties="$extraBuildProperties /p:TargetOS=${{ parameters.targetOS }}"
|
||||
fi
|
||||
|
||||
docker run --rm $dockerVolumeArgs -w /vmr ${{ parameters.container }} ./build.sh /bl:artifacts/log/Release/Test.binlog --source-only --test $poisonArg $(additionalBuildArgs) /p:SmokeTestsWarnOnSdkContentDiffs=true /p:SmokeTestsExcludeOmniSharpTests=${{ parameters.excludeOmniSharpTests }}
|
||||
displayName: Run Tests
|
||||
if [[ ! -z '${{ parameters.targetArchitecture }}' ]]; then
|
||||
extraBuildProperties="$extraBuildProperties /p:TargetArchitecture=${{ parameters.targetArchitecture }}"
|
||||
fi
|
||||
|
||||
if [[ '${{ parameters.buildSourceOnly }}' == 'True' ]]; then
|
||||
if [[ '${{ parameters.enablePoison }}' == 'True' ]]; then
|
||||
sourceOnlyArgs='--poison'
|
||||
fi
|
||||
sourceOnlyArgs="$sourceOnlyArgs --source-only /p:SmokeTestsWarnOnSdkContentDiffs=true /p:SmokeTestsExcludeOmniSharpTests=${{ parameters.excludeOmniSharpTests }}"
|
||||
fi
|
||||
|
||||
# Only use Docker when a container is specified
|
||||
if [[ -n "${{ parameters.container }}" ]]; then
|
||||
docker run --rm $dockerVolumeArgs -w /vmr ${{ parameters.container }} ./build.sh /bl:artifacts/log/Release/Test.binlog --test $sourceOnlyArgs $extraBuildProperties $(additionalBuildArgs)
|
||||
else
|
||||
cd $(sourcesPath)
|
||||
./build.sh /bl:artifacts/log/Release/Test.binlog --test $sourceOnlyArgs $extraBuildProperties $(additionalBuildArgs)
|
||||
fi
|
||||
|
||||
displayName: Run Tests
|
||||
|
||||
- ${{ if eq(parameters.targetOS, 'windows') }}:
|
||||
|
||||
|
|
|
@ -89,7 +89,6 @@ stages:
|
|||
enablePoison: false # 🚫
|
||||
excludeOmniSharpTests: true # ✅
|
||||
runOnline: true # ✅
|
||||
runTests: true # ✅
|
||||
useMonoRuntime: false # 🚫
|
||||
withPreviousSDK: false # 🚫
|
||||
|
||||
|
@ -110,7 +109,6 @@ stages:
|
|||
enablePoison: false # 🚫
|
||||
excludeOmniSharpTests: true # ✅
|
||||
runOnline: true # ✅
|
||||
runTests: true # ✅
|
||||
useMonoRuntime: false # 🚫
|
||||
withPreviousSDK: false # 🚫
|
||||
reuseBuildArtifactsFrom: centOSStream9_Online_MsftSdk
|
||||
|
@ -130,7 +128,6 @@ stages:
|
|||
enablePoison: true # ✅
|
||||
excludeOmniSharpTests: true # ✅
|
||||
runOnline: false # 🚫
|
||||
runTests: true # ✅
|
||||
useMonoRuntime: false # 🚫
|
||||
withPreviousSDK: true # ✅
|
||||
|
||||
|
@ -151,7 +148,6 @@ stages:
|
|||
enablePoison: false # 🚫
|
||||
excludeOmniSharpTests: true # ✅
|
||||
runOnline: true # ✅
|
||||
runTests: true # ✅
|
||||
useMonoRuntime: false # 🚫
|
||||
withPreviousSDK: false # 🚫
|
||||
|
||||
|
@ -169,7 +165,6 @@ stages:
|
|||
enablePoison: false # 🚫
|
||||
excludeOmniSharpTests: false # 🚫
|
||||
runOnline: false # 🚫
|
||||
runTests: true # ✅
|
||||
useMonoRuntime: false # 🚫
|
||||
withPreviousSDK: false # 🚫
|
||||
|
||||
|
@ -188,7 +183,6 @@ stages:
|
|||
enablePoison: false # 🚫
|
||||
excludeOmniSharpTests: false # 🚫
|
||||
runOnline: true # ✅
|
||||
runTests: true # ✅
|
||||
useMonoRuntime: false # 🚫
|
||||
withPreviousSDK: true # ✅
|
||||
|
||||
|
@ -207,7 +201,6 @@ stages:
|
|||
enablePoison: false # 🚫
|
||||
excludeOmniSharpTests: true # ✅
|
||||
runOnline: false # 🚫
|
||||
runTests: true # ✅
|
||||
useMonoRuntime: false # 🚫
|
||||
withPreviousSDK: true # ✅
|
||||
|
||||
|
@ -225,7 +218,6 @@ stages:
|
|||
enablePoison: false # 🚫
|
||||
excludeOmniSharpTests: true # ✅
|
||||
runOnline: false # 🚫
|
||||
runTests: true # ✅
|
||||
useMonoRuntime: true # ✅
|
||||
withPreviousSDK: false # 🚫
|
||||
|
||||
|
@ -243,7 +235,6 @@ stages:
|
|||
enablePoison: false # 🚫
|
||||
excludeOmniSharpTests: false # 🚫
|
||||
runOnline: false # 🚫
|
||||
runTests: true # ✅
|
||||
useMonoRuntime: false # 🚫
|
||||
withPreviousSDK: false # 🚫
|
||||
|
||||
|
@ -261,7 +252,6 @@ stages:
|
|||
enablePoison: false # 🚫
|
||||
excludeOmniSharpTests: false # 🚫
|
||||
runOnline: false # 🚫
|
||||
runTests: true # ✅
|
||||
useMonoRuntime: false # 🚫
|
||||
withPreviousSDK: false # 🚫
|
||||
|
||||
|
@ -279,7 +269,6 @@ stages:
|
|||
enablePoison: false # 🚫
|
||||
excludeOmniSharpTests: false # 🚫
|
||||
runOnline: false # 🚫
|
||||
runTests: true # ✅
|
||||
useMonoRuntime: false # 🚫
|
||||
withPreviousSDK: false # 🚫
|
||||
|
||||
|
@ -297,7 +286,6 @@ stages:
|
|||
enablePoison: false # 🚫
|
||||
excludeOmniSharpTests: false # 🚫
|
||||
runOnline: false # 🚫
|
||||
runTests: true # ✅
|
||||
useMonoRuntime: false # 🚫
|
||||
withPreviousSDK: false # 🚫
|
||||
reuseBuildArtifactsFrom: Fedora39_Offline_MsftSdk
|
||||
|
@ -344,6 +332,7 @@ stages:
|
|||
container: ${{ variables.androidCrossContainer }}
|
||||
targetOS: android
|
||||
targetArchitecture: arm64
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -356,6 +345,7 @@ stages:
|
|||
crossRootFs: '/crossrootfs/x64'
|
||||
targetOS: browser
|
||||
targetArchitecture: wasm
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -366,6 +356,7 @@ stages:
|
|||
pool: ${{ parameters.pool_Mac }}
|
||||
targetOS: iossimulator
|
||||
targetArchitecture: arm64
|
||||
runTests: false
|
||||
|
||||
### Additional jobs for full build ###
|
||||
- ${{ if in(parameters.scope, 'full') }}:
|
||||
|
@ -380,6 +371,7 @@ stages:
|
|||
container: ${{ variables.androidCrossContainer }}
|
||||
targetOS: android
|
||||
targetArchitecture: arm
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -391,6 +383,7 @@ stages:
|
|||
container: ${{ variables.androidCrossContainer }}
|
||||
targetOS: android
|
||||
targetArchitecture: x64
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -402,6 +395,7 @@ stages:
|
|||
container: ${{ variables.androidCrossContainer }}
|
||||
targetOS: android
|
||||
targetArchitecture: x86
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -415,6 +409,7 @@ stages:
|
|||
targetOS: browser
|
||||
targetArchitecture: wasm
|
||||
extraProperties: /p:DotNetBuildRuntimeWasmEnableThreads=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -427,6 +422,7 @@ stages:
|
|||
crossRootFs: '/crossrootfs/x64'
|
||||
targetOS: linux-bionic
|
||||
targetArchitecture: arm64
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -440,6 +436,7 @@ stages:
|
|||
targetOS: linux-bionic
|
||||
targetArchitecture: arm64
|
||||
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -452,6 +449,7 @@ stages:
|
|||
crossRootFs: '/crossrootfs/x64'
|
||||
targetOS: linux-bionic
|
||||
targetArchitecture: x64
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -465,6 +463,7 @@ stages:
|
|||
targetOS: linux-bionic
|
||||
targetArchitecture: x64
|
||||
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -475,6 +474,7 @@ stages:
|
|||
pool: ${{ parameters.pool_Mac }}
|
||||
targetOS: ios
|
||||
targetArchitecture: arm64
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -486,6 +486,7 @@ stages:
|
|||
targetOS: ios
|
||||
targetArchitecture: arm64
|
||||
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -497,6 +498,7 @@ stages:
|
|||
targetOS: iossimulator
|
||||
targetArchitecture: arm64
|
||||
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -507,6 +509,7 @@ stages:
|
|||
pool: ${{ parameters.pool_Mac }}
|
||||
targetOS: iossimulator
|
||||
targetArchitecture: x64
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -518,6 +521,7 @@ stages:
|
|||
targetOS: iossimulator
|
||||
targetArchitecture: x64
|
||||
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -528,6 +532,7 @@ stages:
|
|||
pool: ${{ parameters.pool_Mac }}
|
||||
targetOS: maccatalyst
|
||||
targetArchitecture: arm64
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -539,6 +544,7 @@ stages:
|
|||
targetOS: maccatalyst
|
||||
targetArchitecture: arm64
|
||||
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -549,6 +555,7 @@ stages:
|
|||
pool: ${{ parameters.pool_Mac }}
|
||||
targetOS: maccatalyst
|
||||
targetArchitecture: x64
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -560,6 +567,7 @@ stages:
|
|||
targetOS: maccatalyst
|
||||
targetArchitecture: x64
|
||||
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -570,6 +578,7 @@ stages:
|
|||
pool: ${{ parameters.pool_Mac }}
|
||||
targetOS: tvos
|
||||
targetArchitecture: arm64
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -581,6 +590,7 @@ stages:
|
|||
targetOS: tvos
|
||||
targetArchitecture: arm64
|
||||
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -591,6 +601,7 @@ stages:
|
|||
pool: ${{ parameters.pool_Mac }}
|
||||
targetOS: tvossimulator
|
||||
targetArchitecture: arm64
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -602,6 +613,7 @@ stages:
|
|||
targetOS: tvossimulator
|
||||
targetArchitecture: arm64
|
||||
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -612,6 +624,7 @@ stages:
|
|||
pool: ${{ parameters.pool_Mac }}
|
||||
targetOS: tvossimulator
|
||||
targetArchitecture: x64
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -623,6 +636,7 @@ stages:
|
|||
targetOS: tvossimulator
|
||||
targetArchitecture: x64
|
||||
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -635,6 +649,7 @@ stages:
|
|||
crossRootFs: '/crossrootfs/x64'
|
||||
targetOS: wasi
|
||||
targetArchitecture: wasm
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -763,6 +778,7 @@ stages:
|
|||
targetOS: osx
|
||||
targetArchitecture: x64
|
||||
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
@ -774,6 +790,7 @@ stages:
|
|||
targetOS: osx
|
||||
targetArchitecture: arm64
|
||||
extraProperties: /p:DotNetBuildRuntimeNativeAOTRuntimePack=true
|
||||
runTests: false
|
||||
|
||||
- template: ../jobs/vmr-build.yml
|
||||
parameters:
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<DefaultExcludesInProjectFolder>$(DefaultExcludesInProjectFolder);assets/**/*</DefaultExcludesInProjectFolder>
|
||||
<UBTestsWarnOnSdkContentDiffs>true</UBTestsWarnOnSdkContentDiffs>
|
||||
<VSTestLogger>console%3bverbosity=diagnostic;trx%3bverbosity=diagnostic%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
|
||||
<VSTestCLIRunSettings>$(VSTestCLIRunSettings);RunConfiguration.DotNetHostPath=$(DotnetTool)</VSTestCLIRunSettings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
Loading…
Reference in a new issue