|
307 | 307 | Condition="'@(_MergedWrapperOutOfProcessTestMarkers)' != ''" />
|
308 | 308 | </ItemGroup>
|
309 | 309 |
|
310 |
| - <ItemGroup> |
| 310 | + <ItemGroup Condition="'@(_MergedWrapperMarker)' != ''" > |
311 | 311 | <_MergedPayloadGroups Include="$(_MergedWrapperName)" />
|
312 | 312 | <_MergedPayloadFiles Include="$(_MergedWrapperDirectory)/**" />
|
313 | 313 | <_MergedPayloadFiles Include="@(_MergedWrapperOutOfProcessTestFiles)" />
|
314 |
| - <_MergedPayloadFiles Update="@(_MergedPayloadFiles)"> |
| 314 | + <_MergedPayloadFiles Update="@(_MergedPayloadFiles)" Condition="'@(_MergedPayloadFiles)' != ''" > |
315 | 315 | <!-- Never use [MSBuild]::MakeRelative here! We have some files containing Unicode characters in their %(FullPath) and
|
316 | 316 | MakeRelative function calls Escape function internally that replaces all the Unicode characters with %<xx>. -->
|
317 | 317 | <FileRelativeToPayloadsRootDirectory>$([System.IO.Path]::GetRelativePath($(TestBinDir), %(FullPath)))</FileRelativeToPayloadsRootDirectory>
|
318 | 318 | </_MergedPayloadFiles>
|
319 | 319 | </ItemGroup>
|
320 | 320 |
|
321 |
| - <ItemGroup> |
| 321 | + <ItemGroup Condition="'@(_MergedPayloadFiles)' != ''" > |
322 | 322 | <!-- Remove the managed pdbs from our payloads.
|
323 | 323 | This is for performance reasons to reduce our helix payload size -->
|
324 |
| - <ReducedMergedPayloadFilesFinal Include="@(_MergedPayloadFiles)" Condition=" '%(Extension)' != '.pdb' and '%(Extension)' != '.OutOfProcessTest' " /> |
| 324 | + <ReducedMergedPayloadFilesFinal Include="@(_MergedPayloadFiles)" Condition=" '%(Extension)' != '.pdb' and '%(Extension)' != '.OutOfProcessTest'" /> |
325 | 325 | </ItemGroup>
|
326 | 326 |
|
327 | 327 | <ItemGroup>
|
|
332 | 332 | <HelixCommandLines Condition="'$(RuntimeVariant)' != 'llvmfullaot'" Include="$(_MergedWrapperRunScriptRelative)" />
|
333 | 333 | </ItemGroup>
|
334 | 334 |
|
335 |
| - <Copy SourceFiles="@(ReducedMergedPayloadFilesFinal)" DestinationFiles="@(ReducedMergedPayloadFilesFinal->'$(MergedPayloadsRootDirectory)\$(_MergedWrapperName)\%(FileRelativeToPayloadsRootDirectory)')" /> |
| 335 | + <Copy SourceFiles="@(ReducedMergedPayloadFilesFinal)" DestinationFiles="@(ReducedMergedPayloadFilesFinal->'$(MergedPayloadsRootDirectory)\$(_MergedWrapperName)\%(FileRelativeToPayloadsRootDirectory)')" Condition="'@(ReducedMergedPayloadFilesFinal)' != ''" /> |
336 | 336 | <WriteLinesToFile File="$(MergedPayloadsRootDirectory)\$(_MergedWrapperName)\HelixCommand.txt" Lines="@(HelixCommandLines)" />
|
337 | 337 | </Target>
|
338 | 338 |
|
|
577 | 577 | <XUnitWrapperDlls>$([System.String]::Join(' ', $([System.IO.Directory]::GetFiles(%(FullPath), '*.XUnitWrapper.dll', SearchOption.AllDirectories))).Replace($([MSBuild]::EnsureTrailingSlash(%(FullPath))),''))</XUnitWrapperDlls>
|
578 | 578 | </LegacyPayloads>
|
579 | 579 | <LegacyPayloads Update="@(LegacyPayloads)">
|
| 580 | + <!-- Specify the test group from the payload name. For explicitly named groups, PayloadGroup specifies the subset of tests we want to run in this Helix Work Item --> |
580 | 581 | <TestGroup>%(PayloadGroup)</TestGroup>
|
581 |
| - <!-- When Payload contains more than one *.XUnitWrapper.dll TestGroup should not be specified. --> |
| 582 | + <!-- When Payload contains more than one *.XUnitWrapper.dll TestGroup should not be specified. When we specify multiple assemblies, we aren't trying to run only a subset of tests within one assembly. --> |
582 | 583 | <TestGroup Condition=" $([MSBuild]::ValueOrDefault(%(XUnitWrapperDlls), '').IndexOf('.XUnitWrapper.dll')) != $([MSBuild]::ValueOrDefault(%(XUnitWrapperDlls), '').LastIndexOf('.XUnitWrapper.dll')) "></TestGroup>
|
| 584 | + <!-- |
| 585 | + PayloadGroup0 is just a synthesized name for a bundle of multiple test assemblies that we send as one payload. |
| 586 | + Normally the condition above catches this case; however, when we're only sending one assembly, passing PayloadGroup0 to Helix means that no tests will be run. |
| 587 | + --> |
| 588 | + <TestGroup Condition="'%(PayloadGroup)' == 'PayloadGroup0'"></TestGroup> |
583 | 589 | <PayloadZipFile>$(LegacyPayloadsRootDirectory)\%(PayloadGroup).zip</PayloadZipFile>
|
584 | 590 | </LegacyPayloads>
|
585 | 591 | </ItemGroup>
|
|
0 commit comments