Skip to content

Commit

Permalink
Include Helix Docker image for test reporting : Follow up from #7383.…
Browse files Browse the repository at this point in the history
… This means we now depend on the Helix clients to do reporting, and the code path is somewhat different for Docker, so let's test one docker variation
  • Loading branch information
MattGal committed Aug 25, 2021
1 parent 65c6d2f commit 34acd61
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ public void VerifyNonEncodedFowardSlashIsConverted()
public void FailOnceThenPass()
{
string target = Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") ?? Environment.GetEnvironmentVariable("TEMP"), "my-test-file-123456.snt");

// If we're inside a Helix Docker work item, GetTempPath() is cleaned every execution,
// but the work item's own directory is not (and is writeable from inside Docker), so use it.
if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DOCKER_ENTRYPOINT")))
{
target = Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD"), "my-test-file-123456.snt");
}

bool exists = File.Exists(target);
if (!exists)
{
Expand Down
2 changes: 2 additions & 0 deletions tests/UnitTests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<HelixTargetQueue Include="Debian.9.Amd64"/>
<HelixTargetQueue Include="RedHat.7.Amd64"/>
<HelixTargetQueue Include="Windows.10.Amd64"/>
<HelixTargetQueue Include="(Debian.10.Amd64)[email protected]/dotnet-buildtools/prereqs:debian-10-helix-amd64-20210304164434-56c6673"/>
</ItemGroup>

<PropertyGroup Condition=" '$(HelixAccessToken)' == '' ">
Expand All @@ -73,6 +74,7 @@
<HelixTargetQueue Include="Debian.9.Amd64.Open"/>
<HelixTargetQueue Include="RedHat.7.Amd64.Open"/>
<HelixTargetQueue Include="Windows.10.Amd64.Open"/>
<HelixTargetQueue Include="(Debian.10.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:debian-10-helix-amd64-20210304164434-56c6673"/>
</ItemGroup>

<PropertyGroup Condition="!$(HelixTargetQueue.StartsWith('Windows'))">
Expand Down

0 comments on commit 34acd61

Please sign in to comment.