-
Notifications
You must be signed in to change notification settings - Fork 29.7k
add an --enable-observatory flag #50663
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
Conversation
| ..addFlag('enable-observatory', | ||
| defaultsTo: false, | ||
| hide: !verboseHelp, | ||
| help: 'Enables the observatory without --start-paused. This flag is ' |
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.
enable-vmservice and replace "observatory" with "vmservice". The former is the name of the particular html client, though we've conflated the two a lot we've been trying to separate it
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.
Done.
| } | ||
|
|
||
| class _FlutterTestRunnerImpl extends FlutterTestRunner { | ||
| const _FlutterTestRunnerImpl() : super._(); |
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.
I would just use implements
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.
done
| } | ||
| } | ||
| } | ||
| } |
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.
| } | |
| } | |
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.
done
| if (!globals.processManager.canRun(shellPath)) { | ||
| throwToolExit('Cannot execute Flutter tester at $shellPath'); | ||
| } | ||
| /// A class that abstracts launching the test process from the test runner. |
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.
@jonahwilliams or @zanderso - should I leave a method here that redirects to const _FlutterTestRunnerImpl().runTests to avoid breaking internal customers? I don't see evidence that we use this but not sure.
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.
FYI @chingjun, though I don't think this is used at all
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.
I don't think this is used internally. But whenever in doubt, you could always run the tests go/flutter-pr-test :)
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.
Ahh, good idea!
jonahwilliams
left a comment
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.
FYI @zanderso
Change LGTM with nit. Would you verify this wrapper isn't used in g3? (I don't think it is..)
|
The only reference I can find is in our own code. |
| throwToolExit('Failed to compile tests'); | ||
| /// Runs tests using package:test and the Flutter engine. | ||
| Future<int> runTests( | ||
| TestWrapper testWrapper, |
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 method has a lot of parameters. Should we have a TestRunnerConfig class to encapsulate and document them?
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.
Probably - I'd rather do that as a separate effort to avoid breaking things (right now I'm just moving it to a class so we can inject and test this)
Description
I want to write a test that checks the timeline without starting paused or being in coverage mode. I need to enable the observatory to do that.
Related Issues
#50648
Tests
I added the following tests:
Test that the flag gets piped through as expected.