Fix standalone coreclr tests build#129292
Conversation
|
@agocke can you please take a look? |
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: EXEC : error : No entry point declared for executable [/home/runtime/src/tests/JIT/Methodical/int64/unsigned/implicit_promotion_il.ilproj] [/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/asyncversions/asyncversions.ilproj] [/home/runtime/src/tests/build.proj]
5c4cde5 to
804a6de
Compare
|
Added one more commit with fix of standalone build of |
|
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
}
]
} |
There was a problem hiding this comment.
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 .entrypoint Main 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 TestLibrary ProjectReference. 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 asyncversions Main 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
These changes allow to build coreclr tests with
BuildAllTestsAsStandalone=trueand for Tizen armel.