Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
a1fa7c94
Commit
a1fa7c94
authored
Aug 03, 2016
by
Chris Bracken
Committed by
GitHub
Aug 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support passing a custom coverage formatter to finalizeCoverage() (#5208)
parent
1aeea626
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
coverage_collector.dart
packages/flutter_tools/lib/src/test/coverage_collector.dart
+8
-6
pubspec.yaml
packages/flutter_tools/pubspec.yaml
+1
-1
No files found.
packages/flutter_tools/lib/src/test/coverage_collector.dart
View file @
a1fa7c94
...
...
@@ -58,16 +58,18 @@ class CoverageCollector {
List
<
Future
<
Null
>>
_jobs
=
<
Future
<
Null
>>[];
Map
<
String
,
dynamic
>
_globalHitmap
;
Future
<
String
>
finalizeCoverage
()
async
{
Future
<
String
>
finalizeCoverage
(
{
Formatter
formatter
}
)
async
{
assert
(
enabled
);
await
finishPendingJobs
();
printTrace
(
'formating coverage data'
);
if
(
_globalHitmap
==
null
)
return
null
;
Resolver
resolver
=
new
Resolver
(
packagesPath:
PackageMap
.
globalPackagesPath
);
LcovFormatter
formater
=
new
LcovFormatter
(
resolver
);
String
packagePath
=
Directory
.
current
.
path
;
List
<
String
>
reportOn
=
<
String
>[
path
.
join
(
packagePath
,
'lib'
)];
return
await
formater
.
format
(
_globalHitmap
,
reportOn:
reportOn
,
basePath:
packagePath
);
if
(
formatter
==
null
)
{
Resolver
resolver
=
new
Resolver
(
packagesPath:
PackageMap
.
globalPackagesPath
);
String
packagePath
=
Directory
.
current
.
path
;
List
<
String
>
reportOn
=
<
String
>[
path
.
join
(
packagePath
,
'lib'
)];
formatter
=
new
LcovFormatter
(
resolver
,
reportOn:
reportOn
,
basePath:
packagePath
);
}
return
await
formatter
.
format
(
_globalHitmap
);
}
}
packages/flutter_tools/pubspec.yaml
View file @
a1fa7c94
...
...
@@ -10,7 +10,7 @@ environment:
dependencies
:
archive
:
^1.0.20
args
:
^0.13.4
coverage
:
^0.
7.9
coverage
:
^0.
8.0
crypto
:
'
>=1.1.1
<3.0.0'
file
:
^0.1.0
http
:
^0.11.3
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment