From b0bdf3de81854d3819ff2c8cf44d8d3004f44d94 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Wed, 18 Jul 2018 17:33:52 +0200 Subject: [PATCH 1/3] Use root-relative filepath in XML output --- src/report/cobertura.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/report/cobertura.rs b/src/report/cobertura.rs index c3adefc2e0..4e6d36332a 100644 --- a/src/report/cobertura.rs +++ b/src/report/cobertura.rs @@ -74,6 +74,7 @@ fn write_class(writer: &mut Writer, /// Input only tracer data from a single source folder fn write_package(mut writer: &mut Writer, package: &Path, + manifest_path: &Path, package_name: &str, coverage: &TraceMap) -> Result { let covered = coverage.covered_in_path(package); @@ -89,7 +90,7 @@ fn write_package(mut writer: &mut Writer, for file in &coverage.files() { if file.parent() == Some(package) { - write_class(&mut writer, package, file, coverage)?; + write_class(&mut writer, manifest_path, file, coverage)?; } } @@ -133,7 +134,7 @@ pub fn export(coverage_data: &TraceMap, config: &Config) { _ => manifest_path, }; let package_name = package_name.to_str().unwrap_or_default(); - let _ = write_package(&mut writer, &parent, package_name, &coverage_data); + let _ = write_package(&mut writer, &parent, &manifest_path, package_name, &coverage_data); } } From 7bfc83ddf7a476eb9fb1a7a939d7060aa4920333 Mon Sep 17 00:00:00 2001 From: Geoff Shannon Date: Wed, 18 Jul 2018 14:13:29 -0700 Subject: [PATCH 2/3] Don't print a line for files that have no uncovered lines --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e012609cac..0cf81b2b37 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -196,7 +196,9 @@ pub fn report_coverage(config: &Config, result: &TraceMap) { uncovered_lines.into_iter() .fold((vec![], vec![]), accumulate_lines); let (groups, _) = accumulate_lines((groups, last_group), u64::max_value()); - println!("{}: {}", path.display(), groups.join(", ")); + if ! groups.is_empty() { + println!("{}: {}", path.display(), groups.join(", ")); + } } println!(); } From 54a523eb01c3f2907eeb09c69fa30676c823c59e Mon Sep 17 00:00:00 2001 From: xd009642 Date: Wed, 18 Jul 2018 23:25:21 +0100 Subject: [PATCH 3/3] Prep for 0.6.5 release --- Cargo.lock | 2 +- Cargo.toml | 2 +- travis-install.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7299232a5c..1d6408f240 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -127,7 +127,7 @@ dependencies = [ [[package]] name = "cargo-tarpaulin" -version = "0.6.4" +version = "0.6.5" dependencies = [ "cargo 0.24.0 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index de7cc876e7..a558f1d96e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-tarpaulin" -version = "0.6.4" +version = "0.6.5" authors = ["Daniel McKenna "] description = "Cargo-Tarpaulin is a tool to determine code coverage achieved via tests" repository = "https://github.com/xd009642/tarpaulin" diff --git a/travis-install.sh b/travis-install.sh index d525b78800..eef0cb8fe6 100755 --- a/travis-install.sh +++ b/travis-install.sh @@ -1,3 +1,3 @@ #!/bin/bash -curl -sL https://github.com/xd009642/tarpaulin/releases/download/0.6.4/cargo-tarpaulin-0.6.4-travis.tar.gz | tar xvz -C $HOME/.cargo/bin +curl -sL https://github.com/xd009642/tarpaulin/releases/download/0.6.5/cargo-tarpaulin-0.6.5-travis.tar.gz | tar xvz -C $HOME/.cargo/bin echo "WARNING This method is no longer recommended. Use docker or crates.io to install tarpaulin"