Skip to content

Commit 127fe2d

Browse files
Copilotsbomer
andauthored
Write ExpectedExitCode marker in GenerateMarkerFiles (#124582)
`GenerateMarkerFiles` did not emit the expected-exit-code marker, so merged/standalone test payloads could miss `ExpectedExitCode.txt`. This change adds marker generation directly in the existing marker pipeline. - **Scope** - Updates `src/tests/Directory.Build.targets` in `GenerateMarkerFiles`. - **Behavior change** - Adds a marker entry for `$(IntermediateOutputPath)\ExpectedExitCode.txt`. - Writes `$(ExpectedExitCode)` as file content. - Applies only when: - `$(ExpectedExitCode)` is set - test is merged runner or standalone runner - `$(CLRTestKind)` is not `SharedLibrary` - **Implementation (minimal diff)** ```xml <MarkerFile Include="$(IntermediateOutputPath)\ExpectedExitCode.txt" Condition="'$(ExpectedExitCode)' != '' and ('$(IsMergedTestRunnerAssembly)' == 'true' or '$(BuildAllTestsAsStandalone)' == 'true') and '$(CLRTestKind)' != 'SharedLibrary'"> <Type>$(ExpectedExitCode)</Type> </MarkerFile> ``` <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: sbomer <787361+sbomer@users.noreply.github.com>
1 parent 44e21b7 commit 127fe2d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/tests/Directory.Build.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,9 @@
434434
<MarkerFile Include="$(IntermediateOutputPath)\$(AssemblyName).NoMonoAot" Condition="'$(MonoAotIncompatible)' == 'true'">
435435
<Type>NoMonoAot</Type>
436436
</MarkerFile>
437+
<MarkerFile Include="$(IntermediateOutputPath)\ExpectedExitCode.txt" Condition="'$(ExpectedExitCode)' != '' and ('$(IsMergedTestRunnerAssembly)' == 'true' or '$(BuildAllTestsAsStandalone)' == 'true') and '$(CLRTestKind)' != 'SharedLibrary'">
438+
<Type>$(ExpectedExitCode)</Type>
439+
</MarkerFile>
437440
<Content Include="@(MarkerFile)" CopyToOutputDirectory="PreserveNewest" />
438441
</ItemGroup>
439442

0 commit comments

Comments
 (0)