Skip to content

[tests] Replace make-based packaged macOS test runner with C# script#25749

Merged
rolfbjarne merged 19 commits into
mainfrom
dev/rolf/improved-macos-test-runner
Jun 24, 2026
Merged

[tests] Replace make-based packaged macOS test runner with C# script#25749
rolfbjarne merged 19 commits into
mainfrom
dev/rolf/improved-macos-test-runner

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Replace the Makefile-based test runner (packaged-macos-tests.mk + run-with-timeout + mac-test-report-generator) with a single C# script project (scripts/run-packaged-macos-tests) that:

  • Executes pre-built macOS and Mac Catalyst test apps with timeout and launch retry logic
  • Generates an HTML report with per-platform/architecture breakdown tables showing output links and [FAIL] lines inline
  • Generates TestSummary.md for GitHub PR comments
  • Handles ARM64/x64 architecture detection and skipping
  • Collects and links crash reports

Simplifies run_mac_tests.ps1 from ~235 lines to ~150 lines by delegating all test execution and reporting to the new C# tool.

🤖 Pull request created by Copilot

rolfbjarne and others added 5 commits June 19, 2026 13:03
Replace the Makefile-based test runner (packaged-macos-tests.mk + run-with-timeout
+ mac-test-report-generator) with a single C# script project
(scripts/run-packaged-macos-tests) that:

- Executes pre-built macOS and Mac Catalyst test apps with timeout and
  launch retry logic (previously in run-with-timeout)
- Generates an HTML report with per-platform/architecture breakdown tables
  (previously in mac-test-report-generator)
- Generates TestSummary.md for GitHub PR comments
- Handles ARM64/x64 architecture detection and skipping
- Reports crash reports

Simplify run_mac_tests.ps1 to delegate all test execution and reporting
to the new C# tool, and update package-mac-tests.sh to include it in the
test package.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The --autostart --autoexit arguments are only passed to Mac Catalyst
test apps, matching the behavior in packaged-macos-tests.mk.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Combine stdout and stderr into a single output file per test config
- Add output file link directly in the table's Output column
- Show [FAIL] lines immediately after each failing test row in the
  table instead of in a separate list after the table

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

rolfbjarne and others added 7 commits June 23, 2026 10:19
- Add @media (prefers-color-scheme: dark) CSS with GitHub-dark-themed colors
- Skip x64 test configs on macOS 27+ (not needed, always on Apple Silicon)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…n detection

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…code

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

rolfbjarne and others added 5 commits June 23, 2026 15:54
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Copilot AI 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.

Pull request overview

This PR replaces the previous make-based packaged macOS test runner (Makefile targets + run-with-timeout + mac-test-report-generator) with a single C# script tool that runs the prebuilt test apps and generates both an HTML report and TestSummary.md, while simplifying the CI PowerShell wrapper.

Changes:

  • Added scripts/run-packaged-macos-tests (C# tool) to execute packaged macOS/Mac Catalyst tests with timeout/retry and to generate HTML + markdown summaries.
  • Updated run_mac_tests.ps1 to build and invoke the new tool instead of make targets and the old HTML report generator.
  • Removed mac-test-report-generator integration from the packaged tests and packaging scripts.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tools/devops/automation/scripts/run_mac_tests.ps1 Delegates packaged test execution + reporting to the new C# tool.
tests/packaged-macos-tests.mk Removes the old HTML report generator include/target.
tests/package-mac-tests.sh Packages the new run-packaged-macos-tests script instead of mac-test-report-generator.
scripts/run-packaged-macos-tests/run-packaged-macos-tests.csproj New script project for the packaged test runner tool.
scripts/run-packaged-macos-tests/run-packaged-macos-tests.cs Implements running test apps, aggregating results, and generating HTML/TestSummary outputs.
scripts/run-packaged-macos-tests/fragment.mk Adds template.mk integration for building the new script.
scripts/mac-test-report-generator/mac-test-report-generator.cs Deletes the old standalone HTML report generator implementation.
scripts/mac-test-report-generator/fragment.mk Removes template.mk integration for the deleted report generator.


if ($testExitCode -ne 0) {
# We failed, so write to the comment file why we failed.
Set-Content -Path "$GithubFailureCommentFile" -Value "Tests failed (see HTML report for details)"
Comment thread scripts/run-packaged-macos-tests/run-packaged-macos-tests.cs
Comment on lines +452 to +454
var htmlDir = Path.GetDirectoryName (reportPath);
if (!string.IsNullOrEmpty (htmlDir))
Directory.CreateDirectory (htmlDir);
Comment thread scripts/run-packaged-macos-tests/run-packaged-macos-tests.cs
- Fix failure comment to not assume HTML report exists
- Dispose ManualResetEvent with 'using' declaration
- Use Path.GetFullPath for report path to avoid null directory

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rolfbjarne rolfbjarne marked this pull request as ready for review June 23, 2026 17:24
@rolfbjarne rolfbjarne enabled auto-merge (squash) June 23, 2026 17:25
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #174b5b9] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 174b5b9a62d770c1bfd53e7c79d2e89d9c98bbb7 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #174b5b9] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 174b5b9a62d770c1bfd53e7c79d2e89d9c98bbb7 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 174b5b9a62d770c1bfd53e7c79d2e89d9c98bbb7 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #174b5b9] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 174b5b9a62d770c1bfd53e7c79d2e89d9c98bbb7 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #174b5b9] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 207 tests passed 🎉

Tests counts

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 19 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 20 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ monotouch (tvOS): All 20 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 174b5b9a62d770c1bfd53e7c79d2e89d9c98bbb7 [PR build]

@rolfbjarne rolfbjarne merged commit dfccfc6 into main Jun 24, 2026
56 checks passed
@rolfbjarne rolfbjarne deleted the dev/rolf/improved-macos-test-runner branch June 24, 2026 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants