From e14ea247b1e2f1189c370b72be616ad5181bbb34 Mon Sep 17 00:00:00 2001 From: Widthdom Date: Sun, 24 May 2026 20:23:47 +0900 Subject: [PATCH] Skip macOS arm64 trimmed alias publish test (#2606) --- TESTING_GUIDE.md | 4 ++++ changelog.d/unreleased/2606.fixed.md | 17 +++++++++++++++++ .../CodeIndex.Tests/IndexCommandRunnerTests.cs | 9 +++++++++ .../CodeIndex.Tests/QueryCommandRunnerTests.cs | 2 +- 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 changelog.d/unreleased/2606.fixed.md diff --git a/TESTING_GUIDE.md b/TESTING_GUIDE.md index 331af8b729..166cd59f64 100644 --- a/TESTING_GUIDE.md +++ b/TESTING_GUIDE.md @@ -44,6 +44,8 @@ The test project mirrors the production areas closely. is a coarse runaway guard for the real `InstallScriptTests.cs` C# extraction fixture. Its wall-clock budget is intentionally broader than a benchmark so slower or noisy CI hosts do not fail the suite for ordinary variance. - `IndexCommandRunnerTests.RunBackfillFold_PublishedTrimmedBinary_SerializesSuccessAndErrorJson` publishes a trimmed RID-specific CLI and runs whichever entry point the SDK emits (`cdidx.dll` through `dotnet` or the native `cdidx`/`cdidx.exe` apphost). It is reported as skipped on macOS arm64 while the current SDK/ILLink path can crash before exercising `cdidx`. Do not assume every SDK/runtime pair writes a `cdidx.dll` into self-contained publish output. +- `QueryCommandRunnerTests.RunPublishedTrimmedCli_SearchSupportsCSharpRazorAliases` + uses the same trimmed RID-specific publish path to verify C# Razor language aliases. It is also reported as skipped on macOS arm64 because the SDK/ILLink crash happens before the test reaches `cdidx`. - `McpServerTests.cs` MCP JSON-RPC behavior and tool outputs. - `HttpMcpTransportTests.cs` @@ -227,6 +229,8 @@ dotnet test --filter "FullyQualifiedName~GitHelperTests" は実ファイル `InstallScriptTests.cs` を C# 抽出に通す coarse な runaway guard です。wall-clock の予算は benchmark より意図的に広く取り、遅い / 混雑した CI host で通常の揺れだけにより suite が失敗しないようにしています。 - `IndexCommandRunnerTests.RunBackfillFold_PublishedTrimmedBinary_SerializesSuccessAndErrorJson` は trimmed な RID 固有 CLI を publish し、SDK が生成した entry point(`dotnet` 経由の `cdidx.dll`、または native の `cdidx`/`cdidx.exe` apphost)を実行します。self-contained publish output に常に `cdidx.dll` が出るとは仮定しないでください。 +- `QueryCommandRunnerTests.RunPublishedTrimmedCli_SearchSupportsCSharpRazorAliases` + は同じ trimmed RID 固有 publish 経路で C# Razor の言語 alias を検証します。このテストも macOS arm64 では、`cdidx` に到達する前に SDK/ILLink がクラッシュし得るため skipped として報告されます。 - `McpServerTests.cs` MCP の JSON-RPC 挙動とツール出力のテスト。 - `GitHelperTests.cs` diff --git a/changelog.d/unreleased/2606.fixed.md b/changelog.d/unreleased/2606.fixed.md new file mode 100644 index 0000000000..a38d48116d --- /dev/null +++ b/changelog.d/unreleased/2606.fixed.md @@ -0,0 +1,17 @@ +--- +category: fixed +issues: + - 2606 +affected: + - tests/CodeIndex.Tests/IndexCommandRunnerTests.cs + - tests/CodeIndex.Tests/QueryCommandRunnerTests.cs + - TESTING_GUIDE.md +--- + +## English + +- **macOS arm64 trimmed publish alias coverage is skipped while ILLink crashes (#2606)** — the C# Razor alias trimmed publish test now reports as skipped on macOS arm64 instead of failing before `cdidx` can run. + +## 日本語 + +- **macOS arm64 の trimmed publish alias カバレッジを ILLink クラッシュ中は skip するようにしました (#2606)** — C# Razor alias の trimmed publish テストは、`cdidx` 実行前に失敗する代わりに macOS arm64 で skipped として報告されます。 diff --git a/tests/CodeIndex.Tests/IndexCommandRunnerTests.cs b/tests/CodeIndex.Tests/IndexCommandRunnerTests.cs index 07c12b05c9..31287f5c89 100644 --- a/tests/CodeIndex.Tests/IndexCommandRunnerTests.cs +++ b/tests/CodeIndex.Tests/IndexCommandRunnerTests.cs @@ -18,6 +18,15 @@ public SkipOnMacOsArm64FactAttribute() } } +public sealed class SkipOnMacOsArm64TheoryAttribute : TheoryAttribute +{ + public SkipOnMacOsArm64TheoryAttribute() + { + if (OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64) + Skip = "macOS arm64 SDK/ILLink currently crashes before this test can exercise cdidx (#2606)."; + } +} + /// /// Tests for indexing command argument handling. /// インデックスコマンドの引数処理テスト。 diff --git a/tests/CodeIndex.Tests/QueryCommandRunnerTests.cs b/tests/CodeIndex.Tests/QueryCommandRunnerTests.cs index 66508426e3..57a1909e9f 100644 --- a/tests/CodeIndex.Tests/QueryCommandRunnerTests.cs +++ b/tests/CodeIndex.Tests/QueryCommandRunnerTests.cs @@ -1976,7 +1976,7 @@ public void RunPublishedTrimmedCli_SerializesQueryJsonAndErrorJson() } } - [Theory] + [SkipOnMacOsArm64Theory] [InlineData("cshtml")] [InlineData("razor")] public void RunPublishedTrimmedCli_SearchSupportsCSharpRazorAliases(string lang)