Skip to content

fix: prioritize xcresult output over stderr noise in test results#254

Open
czottmann wants to merge 1 commit intogetsentry:mainfrom
czottmann:fix/stderr-warning-classification
Open

fix: prioritize xcresult output over stderr noise in test results#254
czottmann wants to merge 1 commit intogetsentry:mainfrom
czottmann:fix/stderr-warning-classification

Conversation

@czottmann
Copy link

@czottmann czottmann commented Feb 28, 2026

Summary

When xcodebuild tests fail, stderr output (e.g. "multiple matching destinations" warnings) was being tagged as errors and displayed prominently, hiding the actual test failure details from the xcresult bundle.

This PR fixes the response assembly in all three test tool paths (test_macos, test_device, test-common):

  • When tests ran (totalTestCount > 0): xcresult is the authoritative source. Stderr lines are filtered out as redundant noise, and the xcresult summary is placed first in the response.
  • When the build failed (totalTestCount == 0): xcresult is meaningless (empty summary). Stderr is preserved since it contains the actual compilation errors.

No changes to build-utils.ts or stderr capture/classification logic.

Fixes #231

Test plan

  • All 1367 tests pass (1352 passed, 15 skipped)
  • New test: stderr filtered when xcresult has real test data (test_macos, test_device)
  • New test: stderr preserved when xcresult reports 0 tests / build failure (test_macos, test_device)
  • Manual testing: confirmed test failures show xcresult details without stderr wall
  • Manual testing: confirmed build errors (syntax error in Swift file) are still visible when build fails before tests run

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@czottmann czottmann force-pushed the fix/stderr-warning-classification branch from c6d1a9d to ecf2288 Compare February 28, 2026 14:16
@czottmann czottmann marked this pull request as draft February 28, 2026 14:47
When xcresult parsing succeeds and tests actually ran (totalTestCount > 0),
stderr lines are redundant noise (e.g. "multiple matching destinations")
and are filtered out. The xcresult summary is placed first in the response.

When xcresult reports 0 tests (build failed before tests could run), the
xcresult is meaningless and stderr is preserved since it contains the
actual compilation errors.

Fixes getsentry#231
@czottmann czottmann force-pushed the fix/stderr-warning-classification branch from ecf2288 to 14eaf6e Compare February 28, 2026 15:31
@czottmann czottmann changed the title fix: classify stderr warnings correctly and prioritize xcresult output fix: prioritize xcresult output over stderr noise in test results Feb 28, 2026
@czottmann czottmann marked this pull request as ready for review February 28, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: "multiple matching destinations" warning reported as error instead of failing tests

1 participant