Skip to content

Commit

Permalink
chore(tests): Ignore codeless files.
Browse files Browse the repository at this point in the history
  • Loading branch information
vifino committed Feb 11, 2024
1 parent 315ae36 commit 9690716
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
llvm-cov --version
llvm-profdata merge --sparse -o /tmp/nvmetcfg.profdata /tmp/nvmetcfg-*.profraw
llvm-cov export -format=lcov -instr-profile=/tmp/nvmetcfg.profdata \
--ignore-filename-regex='/.cargo/registry' \
--ignore-filename-regex=/.cargo/registry --ignore-filename-regex=src/lib.rs --ignore-filename-regex=src/state/mod.rs \
--show-instantiation-summary \
$(cargo test --tests --no-run --message-format=json | jq -r "select(.profile.test == true) | .filenames[]" | xargs -I {} printf "-object {} ") > nvmetcfg.lcov
- name: Upload to codecov.io
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
})
cargo-bloat
cargo-llvm-cov
llvmPackages_latest.bintools
];
};

Expand Down
4 changes: 2 additions & 2 deletions tests/loop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
# Export coverage.
node.succeed("llvm-profdata merge --sparse -o /tmp/nvmetcfg.profdata /tmp/nvmetcfg-*.profraw")
node.succeed("llvm-cov export -format=lcov -instr-profile=/tmp/nvmetcfg.profdata " +
"--ignore-filename-regex=/.cargo/registry --show-instantiation-summary " +
"-object $(which nvmet) > /tmp/nvmet.lcov")
"--ignore-filename-regex=/.cargo/registry --ignore-filename-regex=src/lib.rs --ignore-filename-regex=src/state/mod.rs " +
"--show-instantiation-summary -object $(which nvmet) > /tmp/nvmet.lcov")
node.copy_from_vm("/tmp/nvmet.lcov")
'';
}
4 changes: 2 additions & 2 deletions tests/rdma.nix
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@
# Export coverage.
target.succeed("llvm-profdata merge --sparse -o /tmp/nvmetcfg.profdata /tmp/nvmetcfg-*.profraw")
target.succeed("llvm-cov export -format=lcov -instr-profile=/tmp/nvmetcfg.profdata " +
"--ignore-filename-regex=/.cargo/registry --show-instantiation-summary " +
"-object $(which nvmet) > /tmp/nvmet.lcov")
"--ignore-filename-regex=/.cargo/registry --ignore-filename-regex=src/lib.rs --ignore-filename-regex=src/state/mod.rs " +
"--show-instantiation-summary -object $(which nvmet) > /tmp/nvmet.lcov")
target.copy_from_vm("/tmp/nvmet.lcov")
'';
}
4 changes: 2 additions & 2 deletions tests/tcp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@
# Export coverage.
target.succeed("llvm-profdata merge --sparse -o /tmp/nvmetcfg.profdata /tmp/nvmetcfg-*.profraw")
target.succeed("llvm-cov export -format=lcov -instr-profile=/tmp/nvmetcfg.profdata " +
"--ignore-filename-regex=/.cargo/registry --show-instantiation-summary " +
"-object $(which nvmet) > /tmp/nvmet.lcov")
"--ignore-filename-regex=/.cargo/registry --ignore-filename-regex=src/lib.rs --ignore-filename-regex=src/state/mod.rs " +
"--show-instantiation-summary -object $(which nvmet) > /tmp/nvmet.lcov")
target.copy_from_vm("/tmp/nvmet.lcov")
'';
}

0 comments on commit 9690716

Please sign in to comment.