PR Feedback to not use targetgroup for allconfigurations in sendtohelix

This commit is contained in:
Santiago Fernandez Madero 2020-01-23 10:44:11 -08:00
parent 66148892f1
commit df7fcefd56
5 changed files with 15 additions and 9 deletions

View File

@ -46,6 +46,7 @@ jobs:
- _buildScript: $(_buildScriptFileName)$(scriptExt)
- _warnAsErrorArg: ''
- _testScopeArg: ''
- _extraHelixArguments: ''
- librariesBuildArtifactName: ${{ format('libraries_bin_{0}{1}_{2}_{3}', parameters.osGroup, parameters.osSubgroup, parameters.archType, parameters.buildConfig) }}
@ -69,9 +70,11 @@ jobs:
- ${{ if ne(parameters.framework, '') }}:
- _finalFrameworkArg: -framework ${{ parameters.framework }}
- _extraHelixArguments: /p:TargetGroup=${{ parameters.framework }}
- ${{ if eq(parameters.framework, 'allConfigurations') }}:
- _finalFrameworkArg: -allConfigurations
- _extraHelixArguments: /p:PackageTesting=true
- ${{ if eq(parameters.isOfficialAllConfigurations, true) }}:
- _skipTestHostCopy: true

View File

@ -193,3 +193,4 @@ jobs:
testScope: ${{ parameters.testScope }}
creator: dotnet-bot
helixToken: ''
extraHelixArguments: $(_extraHelixArguments)

View File

@ -10,6 +10,7 @@ parameters:
testRunNamePrefixSuffix: ''
testScope: 'innerloop' # innerloop | outerloop | all
condition: always()
extraHelixArguments: ''
steps:
- script: ${{ parameters.msbuildScript }}
@ -23,11 +24,10 @@ steps:
/p:TestRunNamePrefixSuffix=${{ parameters.testRunNamePrefixSuffix }}
/p:HelixBuild=$(Build.BuildNumber)
/p:Creator=${{ parameters.creator }}
${{ parameters.extraHelixArguments }}
/bl:$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/SendToHelix.binlog
displayName: Send to Helix
condition: and(succeeded(), ${{ parameters.condition }})
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken) # We need to set this env var to publish helix results to Azure Dev Ops
HelixTargetQueues: ${{ parameters.helixQueues }} # Pass queues to MSBuild as env var to avoid need of escaping them
${{ if ne(parameters.framework, '') }}:
TargetGroup: ${{ parameters.framework }} # Pass as env var as we can't condition otherwise, we can't pass empty to set default value.

View File

@ -96,3 +96,4 @@ jobs:
creator: dotnet-bot
helixToken: ''
testRunNamePrefixSuffix: $(_testRunNamePrefixSuffix)
extraHelixArguments: $(_extraHelixArguments)

View File

@ -11,10 +11,10 @@
<!-- We need to enable xunit reporter so that it parses test results
Package testing doesn't run on xunit. -->
<EnableXunitReporter Condition="'$(TargetGroup)' != 'AllConfigurations'">true</EnableXunitReporter>
<EnableXunitReporter Condition="'$(PackageTesting)' != 'true'">true</EnableXunitReporter>
<TestArchiveRuntimeFile>$(TestArchiveRuntimeRoot)test-runtime-$(BuildConfiguration).zip</TestArchiveRuntimeFile>
<TestArchiveRuntimeFile Condition="'$(TargetGroup)' == 'AllConfigurations'">$(TestArchiveRuntimeRoot)packages-testPayload-$(ConfigurationGroup).zip</TestArchiveRuntimeFile>
<TestArchiveRuntimeFile Condition="'$(PackageTesting)' == 'true'">$(TestArchiveRuntimeRoot)packages-testPayload-$(ConfigurationGroup).zip</TestArchiveRuntimeFile>
<!-- The helix runtime payload and the tests to run -->
<HelixCorrelationPayload Condition="'$(HelixCorrelationPayload)' == ''">$(TestArchiveRuntimeFile)</HelixCorrelationPayload>
@ -31,7 +31,7 @@
<FailOnTestFailure Condition="'$(WaitForWorkItemCompletion)' != ''">$(WaitForWorkItemCompletion)</FailOnTestFailure>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetGroup)' == 'AllConfigurations'">
<PropertyGroup Condition="'$(PackageTesting)' == 'true'">
<!-- Use helix feature to include dotnet CLI for every workitem and add it to the path -->
<IncludeDotNetCli>true</IncludeDotNetCli>
<DotNetCliPackageType>sdk</DotNetCliPackageType>
@ -44,10 +44,10 @@
<!-- For PRs we want helixtype to be the same for all frameworks except package testing-->
<TestScope Condition="'$(TestScope)' == ''">innerloop</TestScope>
<HelixType>test/functional/cli/$(TestScope)/</HelixType>
<HelixType Condition="'$(TargetGroup)' == 'AllConfigurations'">test/functional/packaging/</HelixType>
<HelixType Condition="'$(PackageTesting)' == 'true'">test/functional/packaging/</HelixType>
</PropertyGroup>
<PropertyGroup Condition="'$(HelixCommand)' == '' and '$(TargetGroup)' == 'AllConfigurations'">
<PropertyGroup Condition="'$(HelixCommand)' == '' and '$(PackageTesting)' == 'true'">
<HelixPreCommands>set DOTNET_CLI_TELEMETRY_OPTOUT=1;set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1;set DOTNET_MULTILEVEL_LOOKUP=0</HelixPreCommands>
<HelixCommand>dotnet msbuild %HELIX_CORRELATION_PAYLOAD%\test.msbuild</HelixCommand>
@ -80,7 +80,7 @@
<Target Name="CompressRuntimeDirectory"
Inputs="@(_RuntimeInputs);@(TestArchiveRuntimeDependency)"
Outputs="$(TestArchiveRuntimeFile)"
Condition="'$(TargetGroup)' != 'AllConfigurations'">
Condition="'$(PackageTesting)' != 'true'">
<MakeDir Directories="$(TestArchiveRuntimeRoot)" />
<ZipDirectory SourceDirectory="$(TestHostRootPath)"
@ -111,6 +111,7 @@
</Target>
<Target Name="PrintTargetGroup">
<Message Importance="High" Text="Target Group: $(TargetGroup)" />
<Message Condition="'$(PackageTesting)' != 'true'" Importance="High" Text="Target Group: $(TargetGroup)" />
<Message Condition="'$(PackageTesting)' == 'true'" Importance="High" Text="Doing Package Testing" />
</Target>
</Project>