Skip to content

[tool] Accept plutil diagnostics from stderr in plist_parser_test (macOS 26) - #193292

Merged
auto-submit[bot] merged 2 commits into
flutter:masterfrom
okorohelijah:fix/193159-plist-parser-test-macos26
Sep 24, 2026
Merged

auto-submit[bot] merged 2 commits into
flutter:masterfrom
okorohelijah:fix/193159-plist-parser-test-macos26

Conversation

@okorohelijah

@okorohelijah okorohelijah commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #193159

What's failing

Two tests in plist_parser_test.dart fail on macOS 26 (first seen on
staging.shadow/Mac tool_integration_tests_1 at Mac-26.6.2 / Xcode 17C52,
https://ci.chromium.org/b/8670252478857878881):

  • PlistParser.getValueFromFile<String> returns null for a malformed plist file
  • PlistParser.replaceKey returns false for a malformed plist file

Both tests still get the right result (null / false, and plutil still
exits 1). What changed is where plutil prints its error:

  • Before macOS 26, plutil printed <path>: Property List error: … / JSON error: …
    on stdout.
  • On macOS 26, plutil was rewritten (Apple open-sourced the new version in
    swift-corelibs-foundation, Sources/plutil/PLUContext.swift) and the same
    message now goes to stderr.

ProcessUtils.runSync logs a failed command's stdout with printStatus and
its stderr with printError. So on macOS 26 logger.statusText is empty and
the diagnostic shows up in logger.errorText instead, ahead of the
ProcessException: line. The tests only looked at statusText.

#172913 ran into the same plutil change last year in xcode_backend.dart.

The fix

Test-only change. PlistParser itself is fine.

  • Look for the plutil diagnostic in statusText + errorText rather than
    statusText alone, so the test passes whichever stream plutil uses. The
    full message is still asserted, so a change in the wording would still be
    caught.
  • Check that errorText ends with the ProcessException block instead of
    equalling it, since on macOS 26 the plutil message now comes first.

How I verified it

  • Ran the tests locally.
  • led run of Mac tool_integration_tests_1 (subshard 1_10, the one that
    contains plist_parser_test.dart) on a Mac-26.6.2 bot (mac-340-g140,
    the same bot as the original failure) at this PR's head:
    https://ci.chromium.org/b/8669753954317678657 — green, both tests pass.

Pre-launch Checklist

On macOS 26, plutil writes its parse diagnostic to stderr instead of
stdout, so the two malformed-plist tests found the message in
logger.errorText rather than logger.statusText and failed.

Check both streams and assert errorText endsWith the ProcessException
block so the prepended diagnostic is tolerated. Test-only; PlistParser is
unchanged.

Fixes flutter#193159
@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Sep 24, 2026
On macOS 26 plutil moved its parse diagnostic from stdout to stderr, but
the wording is unchanged. Assert the full diagnostic against the combined
status and error logs instead of two fragments, so the tests still catch a
change in the reported error. Also scope the comments to what was observed
(before macOS 26 vs macOS 26).
@okorohelijah
okorohelijah marked this pull request as ready for review September 24, 2026 19:23

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates plist_parser_test.dart to handle diagnostic output changes introduced in macOS 26, where plutil writes parse diagnostics to stderr instead of stdout. The tests now combine logger.statusText and logger.errorText for diagnostic assertions and use endsWith for error log matching. There are no review comments, and I have no feedback to provide.

@okorohelijah okorohelijah added the team-ios Owned by iOS platform team label Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[macOS 26] test/integration.shard/plist_parser_test.dart failing

2 participants