Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[testing] Extract StreamCapture test utility #47774

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

cbracken
Copy link
Member

@cbracken cbracken commented Nov 8, 2023

Factors out an RAII-based class that can be used to capture std::cout, std::cerr, or technically any other std::ostream, though that's unlikely to be useful.

This makes the logic reusable but more importantly, ensures the capture is cleaned up at the end of the test.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@cbracken
Copy link
Member Author

cbracken commented Nov 8, 2023

Ran into this while discussing a separate test with @gspencergoog today. I probably should have cleaned this up at the time I first wrote this, but better late than never!

Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@cbracken cbracken force-pushed the capture-stream branch 3 times, most recently from bb6b100 to 3a562d8 Compare November 8, 2023 00:16
@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 8, 2023
Copy link
Contributor

auto-submit bot commented Nov 8, 2023

auto label is removed for flutter/engine/47774, due to - The status or check suite Windows windows_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 8, 2023
Factors out an RAII-based class that can be used to capture std::cout,
std::cerr, or technically any other std::ostream, though that's unlikely
to be useful.

This makes the logic reusable but more importantly, ensures the capture
is cleaned up at the end of the test.
@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 8, 2023
@auto-submit auto-submit bot merged commit 5224cae into flutter:main Nov 8, 2023
25 checks passed
@cbracken cbracken deleted the capture-stream branch November 8, 2023 01:27
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 8, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 8, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 8, 2023
…138091)

flutter/engine@3e3be5e...117d47a

2023-11-08 [email protected] Roll Skia from fce71a80b0a2 to a4cce5236dcf (1 revision) (flutter/engine#47807)
2023-11-08 [email protected] [macOS] Clean up resources in ViewController tests (flutter/engine#47792)
2023-11-08 [email protected] Roll Skia from f3d250126ba9 to fce71a80b0a2 (1 revision) (flutter/engine#47796)
2023-11-08 [email protected] Roll Skia from b4fa927468e6 to f3d250126ba9 (1 revision) (flutter/engine#47793)
2023-11-08 [email protected] [Impeller] Add Rect::GetNormalizingTransform to handle UV coordinate conversion (flutter/engine#47775)
2023-11-08 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Remove Fuchsia Mac SDK from DEPS" (flutter/engine#47791)
2023-11-08 [email protected] [web] fix clicks on merged semantic nodes (attempt #2) (flutter/engine#47360)
2023-11-08 [email protected] Roll Skia from 0f78e5f765d3 to b4fa927468e6 (1 revision) (flutter/engine#47788)
2023-11-08 [email protected] Roll Fuchsia Linux SDK from VcFEJiUUTYwkhEAlJ... to sD8HRA4JmXczujkqO... (flutter/engine#47785)
2023-11-08 [email protected] Fix narrowing conversion lint (flutter/engine#47740)
2023-11-08 [email protected] [macOS] Bail out of tests if engine not running (flutter/engine#47771)
2023-11-08 [email protected] Roll Skia from f91d39395e85 to 0f78e5f765d3 (1 revision) (flutter/engine#47776)
2023-11-08 [email protected] [testing] Extract StreamCapture test utility (flutter/engine#47774)
2023-11-08 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Promote fuchsia build v2 to prod." (flutter/engine#47779)
2023-11-08 [email protected] Include updated locations for dart third_party components into license ignore-list. (flutter/engine#47770)
2023-11-07 [email protected] Remove Fuchsia Mac SDK from DEPS (flutter/engine#47700)
2023-11-07 [email protected] Roll Skia from 030e21befbc9 to f91d39395e85 (6 revisions) (flutter/engine#47769)
2023-11-07 [email protected] [Impeller] Support static thread safety analysis with condition variables. (flutter/engine#47763)
2023-11-07 [email protected] Promote fuchsia build v2 to prod. (flutter/engine#47729)
2023-11-07 [email protected] [Windows] Reduce warnings produced by unit tests (flutter/engine#47724)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from VcFEJiUUTYwk to sD8HRA4JmXcz

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
auto-submit bot pushed a commit that referenced this pull request Aug 22, 2024
Assert that running the macOS engine does not log anything unexpected 
See also issue flutter/flutter#111577
Similar Windows check in #47774

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: desktop autosubmit Merge PR when tree becomes green via auto submit App platform-macos platform-windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants