Skip to content
Merged
Show file tree
Hide file tree
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
182 changes: 117 additions & 65 deletions src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj
Original file line number Diff line number Diff line change
Expand Up @@ -68,58 +68,55 @@
<Import Project="$(DumpTestsPayload)/debuggee-metadata.props" />
<Import Project="$(MSBuildThisFileDirectory)EnableUnsignedDac.props" />

<!-- Build the JSON array of expected debuggees for dump-info.json. -->
<PropertyGroup>
<_DebuggeeJsonArray>@(_Debuggee->'{"name":"%(Identity)","dumpDir":"%(DumpDir)","r2rDir":"%(R2RDir)"}', ',')</_DebuggeeJsonArray>
</PropertyGroup>

<!--
Helix work item command: generate dumps then run tests (or tar + upload).
Helix work item command lines, following patterns in helixpublishwitharcade.proj.

For each debuggee, runs it via the testhost dotnet with DOTNET_DbgEnableMiniDump=1
to produce a crash dump, then either runs xunit or tars dumps for upload.

Windows uses & (runs next regardless of exit code — debuggees crash intentionally).
Unix uses || true to reset failure from crashed debuggees so && chain continues.
Encoding: %25 encodes literal % for Windows env vars (e.g., %25ERRORLEVEL%25).
Bare $VAR is safe — MSBuild only interprets $(…) with parens.
-->

<!-- Windows commands -->
<PropertyGroup Condition="'$(TargetOS)' == 'windows'">
<_DumpGenCommands>@(_Debuggee->'mkdir %HELIX_WORKITEM_PAYLOAD%\dumps\local\%(DumpDir)\%(R2RDir)\%(Identity) &amp; set "DOTNET_DbgMiniDumpType=%(MiniDumpType)" &amp; set "DOTNET_DbgMiniDumpName=%HELIX_WORKITEM_PAYLOAD%\dumps\local\%(DumpDir)\%(R2RDir)\%(Identity)\%(Identity).dmp" &amp; set "DOTNET_ReadyToRun=%(R2RValue)" &amp; %HELIX_CORRELATION_PAYLOAD%\dotnet.exe exec %HELIX_WORKITEM_PAYLOAD%\debuggees\%(Identity)\%(Identity).dll', ' &amp; ')</_DumpGenCommands>
<_DumpInfoCommand>echo {"os":"$(TargetOS)","arch":"$(TargetArchitecture)","debuggees":[$(_DebuggeeJsonArray)]}&gt; %HELIX_WORKITEM_PAYLOAD%\dumps\local\dump-info.json</_DumpInfoCommand>
</PropertyGroup>

<!-- Windows: test mode tail command -->
<PropertyGroup Condition="'$(TargetOS)' == 'windows' AND '$(DumpOnly)' != 'true'">
<_TestCommand>%HELIX_CORRELATION_PAYLOAD%\dotnet.exe exec --runtimeconfig %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json %HELIX_WORKITEM_PAYLOAD%\tests\xunit.console.dll %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults.xml -nologo</_TestCommand>
<_TarCommand>tar -czf %HELIX_WORKITEM_UPLOAD_ROOT%\dumps.tar.gz -C %HELIX_WORKITEM_PAYLOAD%\dumps .</_TarCommand>
<_FullCommand>$(_DumpGenCommands) &amp; $(_DumpInfoCommand) &amp; $(_TestCommand) &amp; if errorlevel 1 set _FAIL=1 &amp; $(_TarCommand) &amp; if defined _FAIL exit /b 1</_FullCommand>
</PropertyGroup>

<!-- Windows: DumpOnly mode tail command -->
<PropertyGroup Condition="'$(TargetOS)' == 'windows' AND '$(DumpOnly)' == 'true'">
<_TarCommand>tar -czf %HELIX_WORKITEM_UPLOAD_ROOT%\dumps.tar.gz -C %HELIX_WORKITEM_PAYLOAD%\dumps .</_TarCommand>
<_FullCommand>$(_DumpGenCommands) &amp; $(_DumpInfoCommand) &amp; $(_TarCommand)</_FullCommand>
</PropertyGroup>

<!-- Unix commands -->
<PropertyGroup Condition="'$(TargetOS)' != 'windows'">
<_DumpGenCommands>@(_Debuggee->'mkdir -p $HELIX_WORKITEM_PAYLOAD/dumps/local/%(DumpDir)/%(R2RDir)/%(Identity) &amp;&amp; DOTNET_DbgMiniDumpType=%(MiniDumpType) DOTNET_DbgMiniDumpName=$HELIX_WORKITEM_PAYLOAD/dumps/local/%(DumpDir)/%(R2RDir)/%(Identity)/%(Identity).dmp DOTNET_ReadyToRun=%(R2RValue) $HELIX_CORRELATION_PAYLOAD/dotnet exec $HELIX_WORKITEM_PAYLOAD/debuggees/%(Identity)/%(Identity).dll || true', ' &amp;&amp; ')</_DumpGenCommands>
<_DumpInfoCommand>echo '{"os":"$(TargetOS)","arch":"$(TargetArchitecture)","debuggees":[$(_DebuggeeJsonArray)]}' &gt; $HELIX_WORKITEM_PAYLOAD/dumps/local/dump-info.json</_DumpInfoCommand>
</PropertyGroup>

<!-- Unix: test mode tail command -->
<PropertyGroup Condition="'$(TargetOS)' != 'windows' AND '$(DumpOnly)' != 'true'">
<_TestCommand>$HELIX_CORRELATION_PAYLOAD/dotnet exec --runtimeconfig $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json $HELIX_WORKITEM_PAYLOAD/tests/xunit.console.dll $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults.xml -nologo</_TestCommand>
<_TarCommand>tar -czf $HELIX_WORKITEM_UPLOAD_ROOT/dumps.tar.gz -C $HELIX_WORKITEM_PAYLOAD/dumps .</_TarCommand>
<_FullCommand>$(_DumpGenCommands) &amp;&amp; $(_DumpInfoCommand) &amp;&amp; $(_TestCommand); _rc=$?; $(_TarCommand); exit $_rc</_FullCommand>
<PropertyGroup>
<_HelixCommandFile>$(DumpTestsPayload)/HelixCommand.txt</_HelixCommandFile>
</PropertyGroup>

<!-- Unix: DumpOnly mode tail command -->
<PropertyGroup Condition="'$(TargetOS)' != 'windows' AND '$(DumpOnly)' == 'true'">
<_TarCommand>tar -czf $HELIX_WORKITEM_UPLOAD_ROOT/dumps.tar.gz -C $HELIX_WORKITEM_PAYLOAD/dumps .</_TarCommand>
<_FullCommand>$(_DumpGenCommands) &amp;&amp; $(_DumpInfoCommand) &amp;&amp; $(_TarCommand)</_FullCommand>
</PropertyGroup>
<!--
Generate crash dumps by running each debuggee with dump collection enabled.
Debuggees crash intentionally to produce dumps — errors are expected and ignored.
-->
<Target Name="_AddDumpGenHeader">
<ItemGroup>
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'" Include="echo === Generating crash dumps ===" />
<_HelixCommandLines Condition="'$(TargetOS)' != 'windows'" Include="echo '=== Generating crash dumps ==='" />
</ItemGroup>
</Target>

<!-- Target batching (Outputs) keeps each debuggee's commands grouped. -->
<Target Name="_AddPerDebuggeeCommands"
DependsOnTargets="_AddDumpGenHeader"
Outputs="%(_Debuggee.Identity)-%(_Debuggee.DumpDir)-%(_Debuggee.R2RDir)">
Comment thread
max-charlamb marked this conversation as resolved.
<ItemGroup>
<!-- Windows: create dir, set env vars, run debuggee -->
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="mkdir %25HELIX_WORKITEM_PAYLOAD%25\dumps\local\%(_Debuggee.DumpDir)\%(_Debuggee.R2RDir)\%(_Debuggee.Identity)" />
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="echo Generating dump for %(_Debuggee.Identity) (%(_Debuggee.DumpDir)\%(_Debuggee.R2RDir))..." />
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="set &quot;DOTNET_DbgMiniDumpType=%(_Debuggee.MiniDumpType)&quot;" />
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="set &quot;DOTNET_DbgMiniDumpName=%25HELIX_WORKITEM_PAYLOAD%25\dumps\local\%(_Debuggee.DumpDir)\%(_Debuggee.R2RDir)\%(_Debuggee.Identity)\%(_Debuggee.Identity).dmp&quot;" />
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="set &quot;DOTNET_ReadyToRun=%(_Debuggee.R2RValue)&quot;" />
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="%25HELIX_CORRELATION_PAYLOAD%25\dotnet.exe exec %25HELIX_WORKITEM_PAYLOAD%25\debuggees\%(_Debuggee.Identity)\%(_Debuggee.Identity).dll" />
<!-- Unix: create dir, run debuggee with inline env vars -->
<_HelixCommandLines Condition="'$(TargetOS)' != 'windows'"
Include="mkdir -p $HELIX_WORKITEM_PAYLOAD/dumps/local/%(_Debuggee.DumpDir)/%(_Debuggee.R2RDir)/%(_Debuggee.Identity)" />
<_HelixCommandLines Condition="'$(TargetOS)' != 'windows'"
Include="echo &quot; Generating dump for %(_Debuggee.Identity) (%(_Debuggee.DumpDir)/%(_Debuggee.R2RDir))...&quot;" />
<_HelixCommandLines Condition="'$(TargetOS)' != 'windows'"
Include="DOTNET_DbgMiniDumpType=%(_Debuggee.MiniDumpType) DOTNET_DbgMiniDumpName=$HELIX_WORKITEM_PAYLOAD/dumps/local/%(_Debuggee.DumpDir)/%(_Debuggee.R2RDir)/%(_Debuggee.Identity)/%(_Debuggee.Identity).dmp DOTNET_ReadyToRun=%(_Debuggee.R2RValue) $HELIX_CORRELATION_PAYLOAD/dotnet exec $HELIX_WORKITEM_PAYLOAD/debuggees/%(_Debuggee.Identity)/%(_Debuggee.Identity).dll || true" />
</ItemGroup>
</Target>

<!-- Pre-commands: enable dump generation -->
<ItemGroup Condition="'$(TargetOS)' == 'windows'">
Expand All @@ -146,24 +143,79 @@
<HelixPreCommands>@(HelixPreCommand)</HelixPreCommands>
</PropertyGroup>

<!-- Test mode: generate dumps, run tests, then tar dumps for download -->
<ItemGroup Condition="'$(DumpOnly)' != 'true'">
<HelixWorkItem Include="CdacDumpTests">
<PayloadDirectory>$(DumpTestsPayload)</PayloadDirectory>
<Command>$(_FullCommand)</Command>
<Timeout>$(WorkItemTimeout)</Timeout>
<DownloadFilesFromResults>dumps.tar.gz</DownloadFilesFromResults>
</HelixWorkItem>
</ItemGroup>

<!-- DumpOnly mode: generate dumps, tar, and upload for download -->
<ItemGroup Condition="'$(DumpOnly)' == 'true'">
<HelixWorkItem Include="CdacDumpGen">
<PayloadDirectory>$(DumpTestsPayload)</PayloadDirectory>
<Command>$(_FullCommand)</Command>
<Timeout>$(WorkItemTimeout)</Timeout>
<DownloadFilesFromResults>dumps.tar.gz</DownloadFilesFromResults>
</HelixWorkItem>
</ItemGroup>
<!-- Write _HelixCommandLines to file and read back as the work item Command (see helixpublishwitharcade.proj). -->
<Target Name="_CreateHelixWorkItems"
DependsOnTargets="_AddPerDebuggeeCommands"
BeforeTargets="CoreTest">
<!--
Evaluate the @(_Debuggee) item transform into a flat string for the dump-info echo command.
CreateProperty with a bare @() transform (no surrounding text) works inside Targets;
mixing @() with other strings in Include/Value attributes would cause MSB4012.
-->
<CreateProperty Value="@(_Debuggee->'{ &quot;name&quot;: &quot;%(Identity)&quot;, &quot;dumpDir&quot;: &quot;%(DumpDir)&quot;, &quot;r2rDir&quot;: &quot;%(R2RDir)&quot; }', ',')">
<Output TaskParameter="Value" PropertyName="_EvalDebuggeeJsonArray" />
</CreateProperty>

<!-- Post-dump-gen commands added here so they follow per-debuggee commands in order. -->
<ItemGroup>
<!-- Write dump metadata file for the test harness. -->
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="echo {&quot;os&quot;:&quot;$(TargetOS)&quot;,&quot;arch&quot;:&quot;$(TargetArchitecture)&quot;,&quot;debuggees&quot;:[$(_EvalDebuggeeJsonArray)]}&gt; %25HELIX_WORKITEM_PAYLOAD%25\dumps\local\dump-info.json" />
<_HelixCommandLines Condition="'$(TargetOS)' != 'windows'"
Include="echo '{&quot;os&quot;:&quot;$(TargetOS)&quot;,&quot;arch&quot;:&quot;$(TargetArchitecture)&quot;,&quot;debuggees&quot;:[$(_EvalDebuggeeJsonArray)]}' &gt; $HELIX_WORKITEM_PAYLOAD/dumps/local/dump-info.json" />
</ItemGroup>

<!-- Test mode only: run xunit, capture exit code, propagate after archive. -->
<ItemGroup Condition="'$(DumpOnly)' != 'true'">
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="%25HELIX_CORRELATION_PAYLOAD%25\dotnet.exe exec --runtimeconfig %25HELIX_WORKITEM_PAYLOAD%25\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile %25HELIX_WORKITEM_PAYLOAD%25\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json %25HELIX_WORKITEM_PAYLOAD%25\tests\xunit.console.dll %25HELIX_WORKITEM_PAYLOAD%25\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults.xml -nologo" />
<_HelixCommandLines Condition="'$(TargetOS)' != 'windows'"
Include="$HELIX_CORRELATION_PAYLOAD/dotnet exec --runtimeconfig $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json $HELIX_WORKITEM_PAYLOAD/tests/xunit.console.dll $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults.xml -nologo" />

<!-- Store test exit code before archiving (archive always succeeds and would overwrite it). -->
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="set test_exit_code=%25ERRORLEVEL%25" />
<_HelixCommandLines Condition="'$(TargetOS)' != 'windows'"
Include="test_exit_code=$?" />
Comment thread
max-charlamb marked this conversation as resolved.
</ItemGroup>

<!-- Archive dumps for download regardless of test outcome. -->
<ItemGroup>
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="tar -czf %25HELIX_WORKITEM_UPLOAD_ROOT%25\dumps.tar.gz -C %25HELIX_WORKITEM_PAYLOAD%25\dumps ." />
<_HelixCommandLines Condition="'$(TargetOS)' != 'windows'"
Include="tar -czf $HELIX_WORKITEM_UPLOAD_ROOT/dumps.tar.gz -C $HELIX_WORKITEM_PAYLOAD/dumps ." />
</ItemGroup>

<!-- Propagate test exit code without directly exiting the parent Helix work item shell (see GH issue #126196). -->
<ItemGroup Condition="'$(DumpOnly)' != 'true'">
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="%25ComSpec%25 /C exit %25test_exit_code%25" />
<_HelixCommandLines Condition="'$(TargetOS)' != 'windows'"
Include="set_return() { return $1%3B }" />
<_HelixCommandLines Condition="'$(TargetOS)' != 'windows'"
Include="set_return $test_exit_code" />
Comment thread
max-charlamb marked this conversation as resolved.
Comment thread
max-charlamb marked this conversation as resolved.
</ItemGroup>

<WriteLinesToFile File="$(_HelixCommandFile)" Lines="@(_HelixCommandLines)" Overwrite="true" />

<ItemGroup Condition="'$(DumpOnly)' != 'true'">
<HelixWorkItem Include="CdacDumpTests">
<PayloadDirectory>$(DumpTestsPayload)</PayloadDirectory>
<Command>$([System.IO.File]::ReadAllText('$(_HelixCommandFile)'))</Command>
<Timeout>$(WorkItemTimeout)</Timeout>
<DownloadFilesFromResults>dumps.tar.gz</DownloadFilesFromResults>
</HelixWorkItem>
</ItemGroup>

<ItemGroup Condition="'$(DumpOnly)' == 'true'">
<HelixWorkItem Include="CdacDumpGen">
<PayloadDirectory>$(DumpTestsPayload)</PayloadDirectory>
<Command>$([System.IO.File]::ReadAllText('$(_HelixCommandFile)'))</Command>
<Timeout>$(WorkItemTimeout)</Timeout>
<DownloadFilesFromResults>dumps.tar.gz</DownloadFilesFromResults>
</HelixWorkItem>
</ItemGroup>
</Target>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
dumps/{source_platform}/ — Extracted dumps from each source platform
local/{dumpType}/{r2rMode}/{name}/{name}.dmp

A single Helix work item runs xunit once per source platform, each time
with CDAC_DUMP_ROOT pointing to that platform's dump subdirectory.
One Helix work item is created per source platform, each running xunit with
CDAC_DUMP_ROOT pointing to that platform's dump subdirectory. This gives each
platform independent exit code tracking and test result reporting.

Properties (set by pipeline):
HelixTargetQueues — Helix queue(s) to run on
Expand Down Expand Up @@ -52,20 +53,11 @@
</ItemGroup>

<!--
Build test commands: one xunit invocation per source platform.
Helix work item command lines, following patterns in helixpublishwitharcade.proj.

Windows uses & (run next regardless of exit code).
Unix uses ; (same semantics — run next regardless of exit code).
The XUnit reporter reads the XML results to determine pass/fail,
so the command exit code does not need to be non-zero on failure.
Encoding: %25 encodes literal % for Windows env vars (e.g., %25ERRORLEVEL%25).
Bare $VAR is safe — MSBuild only interprets $(…) with parens.
-->
<PropertyGroup Condition="'$(TargetOS)' == 'windows'">
<_TestCommands>@(_SourcePlatform->'set "CDAC_DUMP_ROOT=%HELIX_WORKITEM_PAYLOAD%\dumps\%(Identity)" &amp; %HELIX_CORRELATION_PAYLOAD%\dotnet.exe exec --runtimeconfig %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json %HELIX_WORKITEM_PAYLOAD%\tests\xunit.console.dll %HELIX_WORKITEM_PAYLOAD%\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults_%(Identity).xml -nologo', ' &amp; ')</_TestCommands>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetOS)' != 'windows'">
<_TestCommands>@(_SourcePlatform->'CDAC_DUMP_ROOT=$HELIX_WORKITEM_PAYLOAD/dumps/%(Identity) $HELIX_CORRELATION_PAYLOAD/dotnet exec --runtimeconfig $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json $HELIX_WORKITEM_PAYLOAD/tests/xunit.console.dll $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults_%(Identity).xml -nologo', ' %3B ')</_TestCommands>
</PropertyGroup>

<!-- Pre-commands -->
<ItemGroup Condition="'$(TargetOS)' != 'windows'">
Expand All @@ -76,13 +68,41 @@
<HelixPreCommands>@(HelixPreCommand)</HelixPreCommands>
</PropertyGroup>

<!-- Single work item: run tests against dumps from all source platforms -->
<ItemGroup>
<HelixWorkItem Include="CdacXPlatDumpTests">
<PayloadDirectory>$(DumpTestsPayload)</PayloadDirectory>
<Command>$(_TestCommands)</Command>
<Timeout>$(WorkItemTimeout)</Timeout>
</HelixWorkItem>
</ItemGroup>
<!--
Create one Helix work item per source platform. Target batching (Outputs)
iterates once per _SourcePlatform. Each work item gets its own command file
and uses the standard testResults.xml filename so the XUnit reporter finds it.
-->
<Target Name="_CreateHelixWorkItems"
Outputs="%(_SourcePlatform.Identity)"
BeforeTargets="CoreTest">
<PropertyGroup>
<_HelixCommandFile>$(DumpTestsPayload)/HelixCommand_%(_SourcePlatform.Identity).txt</_HelixCommandFile>
</PropertyGroup>

<ItemGroup>
<_HelixCommandLines Remove="@(_HelixCommandLines)" />
<!-- Windows: set CDAC_DUMP_ROOT, run xunit -->
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="set &quot;CDAC_DUMP_ROOT=%25HELIX_WORKITEM_PAYLOAD%25\dumps\%(_SourcePlatform.Identity)&quot;" />
<_HelixCommandLines Condition="'$(TargetOS)' == 'windows'"
Include="%25HELIX_CORRELATION_PAYLOAD%25\dotnet.exe exec --runtimeconfig %25HELIX_WORKITEM_PAYLOAD%25\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile %25HELIX_WORKITEM_PAYLOAD%25\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json %25HELIX_WORKITEM_PAYLOAD%25\tests\xunit.console.dll %25HELIX_WORKITEM_PAYLOAD%25\tests\Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults.xml -nologo" />
<!-- Unix: set CDAC_DUMP_ROOT via export, run xunit -->
<_HelixCommandLines Condition="'$(TargetOS)' != 'windows'"
Include="export CDAC_DUMP_ROOT=$HELIX_WORKITEM_PAYLOAD/dumps/%(_SourcePlatform.Identity)" />
<_HelixCommandLines Condition="'$(TargetOS)' != 'windows'"
Include="$HELIX_CORRELATION_PAYLOAD/dotnet exec --runtimeconfig $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.runtimeconfig.json --depsfile $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.deps.json $HELIX_WORKITEM_PAYLOAD/tests/xunit.console.dll $HELIX_WORKITEM_PAYLOAD/tests/Microsoft.Diagnostics.DataContractReader.DumpTests.dll -xml testResults.xml -nologo" />
</ItemGroup>

<WriteLinesToFile File="$(_HelixCommandFile)" Lines="@(_HelixCommandLines)" Overwrite="true" />

<ItemGroup>
<HelixWorkItem Include="CdacXPlatDumpTests_%(_SourcePlatform.Identity)">
<PayloadDirectory>$(DumpTestsPayload)</PayloadDirectory>
<Command>$([System.IO.File]::ReadAllText('$(_HelixCommandFile)'))</Command>
<Timeout>$(WorkItemTimeout)</Timeout>
</HelixWorkItem>
</ItemGroup>
</Target>

</Project>
Loading