Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix publishing to Arcade when there are no merged tests in the set #81054

Merged
merged 1 commit into from
Jan 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/tests/Common/helixpublishwitharcade.proj
Original file line number Diff line number Diff line change
Expand Up @@ -358,22 +358,19 @@
<ItemGroup>
<_MergedWrapperRunScript Include="$([System.IO.Path]::ChangeExtension('%(_MergedWrapperMarker.Identity)', '.$(TestScriptExtension)'))" />
</ItemGroup>
<PropertyGroup>
<PropertyGroup Condition="'@(_MergedWrapperMarker)' != ''" >
<_MergedWrapperDirectory>$([System.IO.Path]::GetDirectoryName('%(_MergedWrapperRunScript.Identity)'))</_MergedWrapperDirectory>
<_MergedWrapperParentDirectory>$([System.IO.Path]::GetDirectoryName('$(_MergedWrapperDirectory)'))</_MergedWrapperParentDirectory>
<_MergedWrapperName>%(_MergedWrapperRunScript.FileName)</_MergedWrapperName>
<_MergedWrapperRunScriptRelative Condition="'%(_MergedWrapperRunScript.Identity)' != ''">$([System.IO.Path]::GetRelativePath($(TestBinDir), %(_MergedWrapperRunScript.FullPath)))</_MergedWrapperRunScriptRelative>
<!-- On Windows, you need to "call" a script or else the cmd.exe instance it is running in will exit, and the HelixPostCommands will not execute. -->
<_MergedWrapperRunScriptPrefix Condition="'$(TestWrapperTargetsWindows)' == 'true'">call </_MergedWrapperRunScriptPrefix>
</PropertyGroup>
<ItemGroup>
<ItemGroup Condition="'@(_MergedWrapperMarker)' != ''" >
<_MergedWrapperOutOfProcessTestMarkers Include="$(_MergedWrapperParentDirectory)/**/*.OutOfProcessTest" />
<_MergedWrapperOutOfProcessTestFiles
Include="%(_MergedWrapperOutOfProcessTestMarkers.RootDir)%(_MergedWrapperOutOfProcessTestMarkers.Directory)/**"
Condition="'@(_MergedWrapperOutOfProcessTestMarkers)' != ''" />
</ItemGroup>

<ItemGroup Condition="'@(_MergedWrapperMarker)' != ''" >
<_MergedPayloadGroups Include="$(_MergedWrapperName)" />
<_MergedPayloadFiles Include="$(_MergedWrapperDirectory)/**" />
<_MergedPayloadFiles Include="@(_MergedWrapperOutOfProcessTestFiles)" />
Expand Down Expand Up @@ -476,7 +473,8 @@
<WriteLinesToFile File="$(MergedPayloadsRootDirectory)\$(_MergedWrapperName)\HelixCommand.txt" Lines="@(HelixCommandLines)" />
<!-- Write the real test exclusion list instead of the placeholder. -->
<WriteLinesToFile File="@(_TestExclusionListPlaceholder->'$(MergedPayloadsRootDirectory)\$(_MergedWrapperName)\%(FileRelativeToPayloadsRootDirectory)')"
Lines="@(FilteredTestExclusionList)" />
Lines="@(FilteredTestExclusionList)"
Condition="'@(_TestExclusionListPlaceholder)' != ''" />
</Target>

<Target Name="PrepareMergedTestPayloadDirectoryForAppleMobile"
Expand Down Expand Up @@ -514,7 +512,8 @@
<Copy SourceFiles="@(_MergedPayloadFiles)" DestinationFiles="@(_MergedPayloadFiles->'$(MergedPayloadsRootDirectory)\$(_MergedWrapperName)\%(FileRelativeToPayloadsRootDirectory)')" />
<!-- Write the real test exclusion list instead of the placeholder. -->
<WriteLinesToFile File="@(_TestExclusionListPlaceholder->'$(MergedPayloadsRootDirectory)\$(_MergedWrapperName)\%(FileRelativeToPayloadsRootDirectory)')"
Lines="@(FilteredTestExclusionList)" />
Lines="@(FilteredTestExclusionList)"
Condition="'@(_TestExclusionListPlaceholder)' != ''" />
</Target>

<Target Name="PrepareMergedTestPayloadDirectory" DependsOnTargets="DiscoverMergedTestWrappers;PrepareMergedTestPayloadDirectoryForDesktop;PrepareMergedTestPayloadDirectoryForAndroid;PrepareMergedTestPayloadDirectoryForWasm;PrepareMergedTestPayloadDirectoryForAppleMobile" />
Expand Down