Skip to content

Commit e440ebc

Browse files
authored
Fix printing Helix workitems count for Android (dotnet#95061)
I noticed that we printed "Done building Helix work items. Work item count: 0" in the Send to Helix step for Android jobs. This is because we only looked at Apple-specific XHarnessAppBundleToTest items in sendtohelix-mobile.proj. Simplified this logic a bit so we can print in sendtohelixhelp.proj instead together with the non-mobile message.
1 parent c46e470 commit e440ebc

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/libraries/sendtohelix-mobile.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@
141141
</Target>
142142

143143
<Target Name="AfterBuildHelixWorkItems_Mobile" AfterTargets="BuildHelixWorkItems">
144-
<Message Condition="'$(Scenario)' == ''" Importance="High" Text="Done building Helix work items. Work item count: @(XHarnessAppBundleToTest->Count())" />
145144

146145
<PropertyGroup>
147146
<_TestPath Condition="'%(XHarnessAppBundleToTest.CustomCommands)' != ''">$([System.IO.Path]::GetDirectoryName('%(XHarnessAppBundleToTest.Identity)'))</_TestPath>

src/libraries/sendtohelixhelp.proj

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,19 @@
299299
</HelixWorkItem>
300300
</ItemGroup>
301301

302-
<Message Condition="'$(Scenario)' != ''" Importance="High" Text="Done building Helix work items for scenario $(Scenario). Work item count: @(HelixWorkItem->Count())" />
303-
<Message Condition="'$(Scenario)' == '' and '$(TargetOS)' != 'android' and '$(TargetOS)' != 'ios' and '$(TargetOS)' != 'iossimulator' and '$(TargetOS)' != 'tvos' and '$(TargetOS)' != 'tvossimulator' and '$(TargetOS)' != 'maccatalyst'" Importance="High" Text="Done building Helix work items. Work item count: @(HelixWorkItem->Count())" />
302+
<ItemGroup>
303+
<HelixWorkItemOrXHarnessTest Include="@(HelixWorkItem)" />
304+
<HelixWorkItemOrXHarnessTest Include="@(XHarnessAppBundleToTest)" />
305+
<HelixWorkItemOrXHarnessTest Include="@(XHarnessApkToTest)" />
306+
</ItemGroup>
307+
308+
<Message Condition="'$(Scenario)' != ''" Importance="High" Text="Done building Helix work items for scenario $(Scenario). Work item count: @(HelixWorkItemOrXHarnessTest->Count())" />
309+
<Message Condition="'$(Scenario)' == ''" Importance="High" Text="Done building Helix work items. Work item count: @(HelixWorkItemOrXHarnessTest->Count())" />
304310

305311
<Message Text="HelixCorrelationPayload: %(HelixCorrelationPayload.Identity)" Condition="'$(HelixDryRun)' == 'true'" Importance="High" />
306312
<Message Text="HelixWorkItem: %(HelixWorkItem.Identity), Command: %(HelixWorkItem.Command), PreCommands: %(HelixWorkItem.PreCommands) with PayloadArchive: %(HelixWorkItem.PayloadArchive)" Condition="'$(HelixDryRun)' == 'true'" Importance="High" />
307313

308-
<Error Condition="@(XHarnessApkToTest->Count()) == 0 and @(XHarnessAppBundleToTest->Count()) == 0 and @(HelixWorkItem->Count()) == 0"
314+
<Error Condition="@(HelixWorkItemOrXHarnessTest->Count()) == 0"
309315
Text="No helix work items, or APKs, or AppBundles found to test" />
310316

311317
<Error Condition="'%(HelixWorkItem.Identity)' != '' and ('%(HelixWorkItem.PayloadArchive)' == '' or !Exists(%(HelixWorkItem.PayloadArchive)))"

0 commit comments

Comments
 (0)