Repository navigation
Stop logging on iOS process exit #66293
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,6 +98,26 @@ void main () { | |
| '', '']); | ||
| }); | ||
|
|
||
| testWithoutContext('app exit', () async { | ||
| final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[ | ||
| const FakeCommand( | ||
| command: <String>['ios-deploy'], | ||
| stdout: '(lldb) run\r\nsuccess\r\nLog on attach\r\nProcess 100 exited with status = 0\r\nLog after process exit', | ||
| ), | ||
| ]); | ||
| final IOSDeployDebugger iosDeployDebugger = IOSDeployDebugger.test( | ||
| processManager: processManager, | ||
| logger: logger, | ||
| ); | ||
| final List<String> receivedLogLines = <String>[]; | ||
| final Stream<String> logLines = iosDeployDebugger.logLines | ||
| ..listen(receivedLogLines.add); | ||
|
|
||
| expect(await iosDeployDebugger.launchAndAttach(), isTrue); | ||
| await logLines.toList(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you could also
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, it doesn't like that:
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh, because it is empty...
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. toList seems easier than Listen/onDone
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Getting the streams to work in these tests was 3x more work than the actual change. |
||
| expect(receivedLogLines, <String>['Log on attach']); | ||
| }); | ||
|
|
||
| testWithoutContext('attach failed', () async { | ||
| final FakeProcessManager processManager = FakeProcessManager.list(<FakeCommand>[ | ||
| const FakeCommand( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails on stable (neither line is printed).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏