-
Notifications
You must be signed in to change notification settings - Fork 28.5k
Add support for --coverage to flutter test #4679
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
e23be59
to
c975c1b
Compare
We need https://github.com/dart-lang/coverage/issues/100 to be fixed before this will be useful. Fixes flutter#2342
Heads up: dart-lang/tools#561 is now fixed. |
printTrace('formating coverage data'); | ||
// TODO(abarth): Use PackageMap.globalPackagesPath once | ||
// https://github.com/dart-lang/coverage/issues/100 is fixed. | ||
Resolver resolver = new Resolver(packageRoot: path.absolute('packages')); |
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.
New param in 0.7.8 is packagesPath
(String path to .packages file)
It's clearly dangerous putting you two in a room together. :) So excited to try this out! |
@@ -105,8 +112,16 @@ void main() { | |||
} | |||
'''); | |||
|
|||
int observatoryPort; |
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.
My understanding was the dart vm would pick an open port if you passed --observatory-port=0, and then we had code to read said port from the logs, etc. Maybe that won't work through our package:test integration? Devon might know.
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.
Yeah, I didn't want to mess with reading the port back from the logs. Seemed easier to push the port number in via a command-line parameter.
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.
We do have code in os.dart
- findAvailablePort()
- that tries to find an available local port. I'm not sure it's more reliable than the random generator below however -
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.
This is ready for review now. |
* use TextDecoration enums * replace GetBlobLength with a function that returns runs based on typeface * a few other minor style fixes
We need dart-lang/tools#561 to be fixed before
this will be useful.
Fixes #2342