Commit 7b99ecff authored by Adam Barth's avatar Adam Barth Committed by GitHub

Use relative paths in lcov.info (#4722)

Using relative paths makes it easier to share lcov.info files across machines.
parent 68efa6a3
...@@ -63,8 +63,9 @@ class CoverageCollector { ...@@ -63,8 +63,9 @@ class CoverageCollector {
await finishPendingJobs(); await finishPendingJobs();
printTrace('formating coverage data'); printTrace('formating coverage data');
Resolver resolver = new Resolver(packagesPath: PackageMap.globalPackagesPath); Resolver resolver = new Resolver(packagesPath: PackageMap.globalPackagesPath);
Formatter formater = new LcovFormatter(resolver); LcovFormatter formater = new LcovFormatter(resolver);
List<String> reportOn = <String>[path.join(Directory.current.path, 'lib')]; String packagePath = Directory.current.path;
return await formater.format(_globalHitmap, reportOn: reportOn); List<String> reportOn = <String>[path.join(packagePath, 'lib')];
return await formater.format(_globalHitmap, reportOn: reportOn, basePath: packagePath);
} }
} }
...@@ -10,7 +10,7 @@ environment: ...@@ -10,7 +10,7 @@ environment:
dependencies: dependencies:
archive: ^1.0.20 archive: ^1.0.20
args: ^0.13.4 args: ^0.13.4
coverage: ^0.7.8 coverage: ^0.7.9
crypto: '>=1.1.1 <3.0.0' crypto: '>=1.1.1 <3.0.0'
file: ^0.1.0 file: ^0.1.0
http: ^0.11.3 http: ^0.11.3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment