Skip to content

Commit

Permalink
test: exclude ord in pe module for coverage
Browse files Browse the repository at this point in the history
This is useless to cover
  • Loading branch information
vthib committed Feb 2, 2023
1 parent 863bb35 commit 9258bb5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ jobs:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v3

- name: Install Rust
run: rustup update stable
- uses: dtolnay/rust-toolchain@nightly

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
Expand Down
1 change: 1 addition & 0 deletions boreal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#![allow(unsafe_code)]
#![deny(missing_docs)]
#![deny(clippy::cargo)]
#![cfg_attr(coverage_nightly, feature(no_coverage))]

// Used in integration tests, not in the library.
// This is to remove the "unused_crate_dependencies" warning, maybe a better solution
Expand Down
2 changes: 2 additions & 0 deletions boreal/src/module/pe/ord.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pub(super) fn ord_lookup(dll_name: &[u8], ord: u16) -> Vec<u8> {
format!("ord{ord}").into_bytes()
}

#[cfg_attr(coverage_nightly, no_coverage)]
fn wsock32_ord_lookup(ord: u16) -> Option<&'static [u8]> {
match ord {
1 => Some(b"accept"),
Expand Down Expand Up @@ -142,6 +143,7 @@ fn wsock32_ord_lookup(ord: u16) -> Option<&'static [u8]> {
}
}

#[cfg_attr(coverage_nightly, no_coverage)]
fn oleaut32_ord_lookup(ord: u16) -> Option<&'static [u8]> {
match ord {
2 => Some(b"SysAllocString"),
Expand Down

0 comments on commit 9258bb5

Please sign in to comment.