add an --enable-observatory flag#50663
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.
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
| } | ||
|
|
||
| class _FlutterTestRunnerImpl extends FlutterTestRunner { | ||
| const _FlutterTestRunnerImpl() : super._(); |
There was a problem hiding this comment.
I would just use implements
| } | ||
| } | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
| } | |
| } | |
| 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.
@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.
FYI @chingjun, though I don't think this is used at all
There was a problem hiding this comment.
I don't think this is used internally. But whenever in doubt, you could always run the tests go/flutter-pr-test :)
jonahwilliams
left a comment
There was a problem hiding this comment.
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.
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.
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.