[librsvg: 1/2] (#705): Fix coverage job
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 1/2] (#705): Fix coverage job
- Date: Thu, 8 Apr 2021 02:39:45 +0000 (UTC)
commit 2f77cbea24d50278165adaadfc6ca1d4f387b875
Author: Dunja Lalic <dunja lalic gmail com>
Date: Wed Apr 7 21:58:21 2021 +0200
(#705): Fix coverage job
Do not clear environment vars of the cmdline tests as the
lack of LLVM_PROFILE_FILE env var causes coverage
analysis to create an unexpected file that cannot be parsed.
https://gitlab.gnome.org/GNOME/librsvg/-/issues/705
.gitlab-ci.yml | 3 ++-
tests/src/cmdline/rsvg_convert.rs | 4 +---
2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index b814528c..b2a28abe 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -116,6 +116,7 @@ coverage:
artifacts: false
variables:
RUSTFLAGS: "-Zinstrument-coverage"
+ RUSTDOCFLAGS: "-Zinstrument-coverage"
LLVM_PROFILE_FILE: "coverage-%p-%m.profraw"
before_script:
- apt update -yqq && apt install -yqq --no-install-recommends libgdk-pixbuf2.0-dev libpango1.0-dev
libcairo2-dev lcov
@@ -123,7 +124,7 @@ coverage:
- curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-linux-x86_64.tar.bz2 | tar jxf
-
script:
- cargo +nightly test --no-fail-fast || true
- - ./grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "*cargo*"
-o lcov.info
+ - ./grcov . --binary-path ./target/debug/ --source-dir . --output-type lcov --llvm --ignore-not-existing
--ignore "*cargo*" --output-path lcov.info
- lcov --summary lcov.info
cargo_bench:
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index bd281665..64c79510 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -37,9 +37,7 @@ struct RsvgConvert {}
impl RsvgConvert {
fn new() -> Command {
- let mut command = Command::cargo_bin("rsvg-convert").unwrap();
- command.env_clear();
- command
+ Command::cargo_bin("rsvg-convert").unwrap()
}
fn new_with_input<P>(file: P) -> Command
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]