[tests] Replace make-based packaged macOS test runner with C# script#25749
Conversation
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>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
- 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>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
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.ps1to build and invoke the new tool instead ofmaketargets and the old HTML report generator. - Removed
mac-test-report-generatorintegration 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)" |
| var htmlDir = Path.GetDirectoryName (reportPath); | ||
| if (!string.IsNullOrEmpty (htmlDir)) | ||
| Directory.CreateDirectory (htmlDir); |
- 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>
✅ [PR Build #174b5b9] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #174b5b9] Build passed (Build packages) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [PR Build #174b5b9] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [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 macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
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:Simplifies
run_mac_tests.ps1from ~235 lines to ~150 lines by delegating all test execution and reporting to the new C# tool.🤖 Pull request created by Copilot