Skip to content

Fix standalone coreclr tests build - #129292

Merged
akoeplinger merged 6 commits into
dotnet:mainfrom
gbalykov:fix-standalone-tests-build
Aug 6, 2026
Merged

Fix standalone coreclr tests build#129292
akoeplinger merged 6 commits into
dotnet:mainfrom
gbalykov:fix-standalone-tests-build

Conversation

@gbalykov

Copy link
Copy Markdown
Member

These changes allow to build coreclr tests with BuildAllTestsAsStandalone=true and for Tizen armel.

@gbalykov

Copy link
Copy Markdown
MemberAuthor

@agocke can you please take a look?

@gbalykov
gbalykovforce-pushed the fix-standalone-tests-build branch from 5c4cde5 to 804a6deCompareJune 25, 2026 13:55
@gbalykov

Copy link
Copy Markdown
MemberAuthor

Added one more commit with fix of standalone build of asyncversions test introduced in #128384

@github-actions

github-actionsBot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Workflow state for the Holistic Review Orchestrator.

{
"version": 5,
"last_dispatched_commit": "804a6deb7739a801bddb05b6e295b41bfcdcfa57",
"last_dispatched_base_ref": "main",
"last_dispatched_base_sha": "abaf96f8a4c14179248dcbc0f73d137344303345",
"last_reviewed_commit": "804a6deb7739a801bddb05b6e295b41bfcdcfa57",
"last_reviewed_base_ref": "main",
"last_reviewed_base_sha": "abaf96f8a4c14179248dcbc0f73d137344303345",
"last_recorded_worker_run_id": "29677700643",
"review_attempt_commit": "",
"review_attempt_base_ref": "",
"review_attempt_count": 0,
"max_review_attempts": 5,
"review_history_format": "holistic-review-disclosure-v1",
"review_history": [
{
"commit": "804a6deb7739a801bddb05b6e295b41bfcdcfa57",
"review_id": 4730523035
}
]
}

@github-actionsgithub-actionsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Holistic Review

Motivation: The CoreCLR test tree can be built with BuildAllTestsAsStandalone=true (used, among other things, for Tizen armel), which compiles each test into its own runnable executable rather than a merged xUnit runner assembly. Several tests and the XUnitLogChecker tool were not standalone-buildable: F# tests lacked an [<EntryPoint>], some IL/project files defaulted to Exe output where a library is required (or vice-versa), asyncversions (added in #128384) had no entry point, capacity was missing a TestLibrary project reference it needs when built in isolation, and XUnitLogChecker unconditionally set PublishTrimmed/PublishSingleFile even when SelfContained=false. This PR fixes those build breaks.

Approach: Small, targeted, per-project edits. F# tests (mutual_recursion.fs, Runtime_87393.fs) gain an [<EntryPoint>] returning 100 on success. asyncversions.il gains a .entrypointMain that invokes the four existing test methods and maps success/exception to exit code 100/101. implicit_promotion_il.ilproj and userevents_common.csproj set <OutputType>Library</OutputType> to match their non-executable nature. capacity.csproj adds the TestLibraryProjectReference. XUnitLogChecker.csproj gates PublishTrimmed/PublishSingleFile on '$(SelfContained)' != 'false'. All changes are confined to src/tests build/test scaffolding; no product code is touched.

Summary: The changes are consistent with existing conventions in the surrounding test tree (100 = pass exit code, TestLibraryProjectPath references, Microsoft.NET.Sdk.IL library projects). The new entry points faithfully mirror the existing xUnit [<Fact>]/test-method bodies, so standalone runs exercise the same logic. Note that the standalone entry points intentionally bypass the xUnit SkipOnCoreClr/SkipOnMono/ConditionalFact guards (e.g. GC/JIT-stress skips on mutual_recursion and Runtime_87393); this is inherent to standalone builds and matches how other standalone tests behave, so it is acceptable rather than a regression introduced here. The asyncversionsMain correctly catches System.Exception and returns 101, and the capacity project reference matches the pattern used by sibling async tests. Risk is low and scoped to non-default test build configurations. I found no correctness issues. LGTM.

Note

This review was generated by this repository's Holistic Review agentic workflow to complement the built-in Copilot review.

Generated by Holistic Review · 63.8 AIC · ⌖ 14.7 AIC · ⊞ 10K

This fixes:
error CS0103: The name 'TestLibrary' does not exist in the current context
This fixes:
/home/runtime/src/tests/JIT/Directed/tailcall/mutual_recursion.fs(564,19): error FS0988: Main module of program is empty: nothing will happen when it is run [/home/runtime/src/tests/JIT/Directed/tailcall/mutual_recursion.fsproj] [/home/runtime/src/tests/build.proj]
This fixes:
CSC : error CS5001: Program does not contain a static 'Main' method suitable for an entry point [/home/runtime/src/tests/tracing/userevents/common/userevents_common.csproj] [/home/runtime/src/tests/build.proj]
This fixes:
EXEC : error : No entry point declared for executable [/home/runtime/src/tests/async/async-versions/async-versions.il] [/home/runtime/src/tests/build.proj]
@gbalykov
gbalykovforce-pushed the fix-standalone-tests-build branch from 804a6de to b8f1f58CompareAugust 4, 2026 15:09
This fixes:
error CS0103: The name 'TestLibrary' does not exist in the current context [/home/runtime/src/tests/JIT/Directed/VectorABI/VectorMgdMgd_r.csproj]
@gbalykov
gbalykovforce-pushed the fix-standalone-tests-build branch from b8f1f58 to c80c698CompareAugust 4, 2026 16:18
@jkotasjkotas added area-Infrastructure and removed area-Infrastructure-coreclr Only use for closed issues labels Aug 4, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

@akoeplinger

Copy link
Copy Markdown
Member

/ba-g unrelated infrastructure timeouts on the windows.10.amd64.open.rt helix queue

@akoeplinger
akoeplinger merged commit 8bb503b into dotnet:mainAug 6, 2026
86 of 93 checks passed
@dotnet-milestone-botdotnet-milestone-botBot added this to the 11.0-rc1 milestone Aug 7, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Infrastructurecommunity-contributionIndicates that the PR has been added by a community member

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants

@gbalykov@akoeplinger@jkoritzinsky@jkotas