From cbe7564cf3f23dcd283a311509736b1d53e2ac9e Mon Sep 17 00:00:00 2001 From: Hero Bird Date: Thu, 14 May 2020 10:49:07 +0200 Subject: [PATCH] Fix coverage reports of incorrectly inlined functions (#393) * Fix coverage reports of incorrectly inlined functions * [ci] fix -Cpanic=abort flag * [ci] remove -Zpanic_abort_tests and -Cpanic=abort flags again They seemed to cause trouble for the coverage reporting system. --- .gitlab-ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 40d2078e..a302f34e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -111,11 +111,14 @@ codecov: variables: # Variables partly came from https://github.com/mozilla/grcov/blob/master/README.md CARGO_INCREMENTAL: 0 - RUSTFLAGS: "-Zprofile -Zmir-opt-level=0 -Zpanic_abort_tests -Ccodegen-units=1 - -Cinline-threshold=0 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off" + RUSTFLAGS: "-Zprofile -Zmir-opt-level=0 -Ccodegen-units=1 + -Copt-level=0 -Clink-dead-code -Coverflow-checks=off" # The `cargo-taurpalin` coverage reporting tool seems to have better code instrumentation and thus # produces better results for Rust codebases in general. However, unlike `grcov` it requires # running docker with `--security-opt seccomp=unconfined` which is why we use `grcov` instead. + # We removed the `-Cinline-threshold=0` flag from the above `RUSTFLAGS` since it was bugged + # at the time and lead to inlining of functions that shouldn't be inlined for the coverage + # report. (More information here: https://github.com/Kogia-sima/rust-covfix/issues/2) script: # RUSTFLAGS are the cause target cache can't be used here - unset "CARGO_TARGET_DIR" -- GitLab