Skip to content

Commit 1899311

Browse files
committed
merge lcov separately, to be able to pass separate binary-path to grcov for unit tests and python binding
1 parent 8e9874a commit 1899311

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.github/workflows/coverage.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
python -m pip install colorama
5353
python -m pip install maturin
5454
python -m pip install pytest
55+
apt install lcov
5556
5657
rustup target add x86_64-unknown-linux-musl
5758
cargo install grcov
@@ -66,8 +67,14 @@ jobs:
6667
run: |
6768
. ./activate
6869
LLVM_PROFILE_FILE="pytest.profraw" pytest clvm/tests
70+
grcov . -s . --binary-path ./venv/lib/python3.9/site-packages/ -t lcov --branch --ignore-not-existing -o pytest.lcov.info --keep-only src
71+
rm pytest.profraw
72+
6973
LLVM_PROFILE_FILE="unittest.profraw" RUSTFLAGS="-Zinstrument-coverage" cargo test --no-default-features
70-
grcov . -s . --binary-path ./venv/lib/python3.9/site-packages/ -t lcov --branch --ignore-not-existing -o lcov.info --keep-only src
74+
grcov . -s . --binary-path ./target/debug/build -t lcov --branch --ignore-not-existing -o unittest.lcov.info --keep-only src
75+
76+
# merge the lcov files
77+
lcov unittest.lcov.info pytest.lcov.info -o lcov.info
7178
7279
- name: Coveralls
7380
uses: coverallsapp/github-action@master

src/int_allocator.rs

-6
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ pub struct IntAllocator {
2929
atom_vec: Vec<IntAtomBuf>,
3030
}
3131

32-
impl Default for IntAllocator {
33-
fn default() -> Self {
34-
Self::new()
35-
}
36-
}
37-
3832
impl IntAllocator {
3933
pub fn new() -> Self {
4034
let mut r = IntAllocator {

0 commit comments

Comments
 (0)