Skip to content

Write ExpectedExitCode marker in GenerateMarkerFiles#124582

Open
Copilot wants to merge 2 commits intomainfrom
copilot/add-expected-exit-code-marker
Open

Write ExpectedExitCode marker in GenerateMarkerFiles#124582
Copilot wants to merge 2 commits intomainfrom
copilot/add-expected-exit-code-marker

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

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)

    <MarkerFile Include="$(IntermediateOutputPath)\ExpectedExitCode.txt"
                Condition="'$(ExpectedExitCode)' != '' and ('$(IsMergedTestRunnerAssembly)' == 'true' or '$(BuildAllTestsAsStandalone)' == 'true') and '$(CLRTestKind)' != 'SharedLibrary'">
      <Type>$(ExpectedExitCode)</Type>
    </MarkerFile>

💡 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 in the docs.

Co-authored-by: sbomer <787361+sbomer@users.noreply.github.com>
Copilot AI changed the title [WIP] Add expected exit code marker in GenerateMarkerFiles Write ExpectedExitCode marker in GenerateMarkerFiles Feb 19, 2026
Copilot AI requested a review from sbomer February 19, 2026 01:25
@sbomer
Copy link
Member

sbomer commented Feb 19, 2026

/azp run runtime-extra-platforms

@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 19, 2026
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds generation of the ExpectedExitCode.txt marker during GenerateMarkerFiles so merged/standalone test payloads reliably carry the expected exit code alongside other marker files.

Changes:

  • Adds a MarkerFile item for $(IntermediateOutputPath)\ExpectedExitCode.txt gated on $(ExpectedExitCode) being set and the build producing a merged or standalone runner (excluding SharedLibrary).
  • Writes $(ExpectedExitCode) as the marker file content via the existing WriteLinesToFile marker pipeline.

@sbomer sbomer requested a review from jkoritzinsky February 19, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants

Comments