diff --git a/Makefile b/Makefile index dd441e1b..0e9dfb98 100644 --- a/Makefile +++ b/Makefile @@ -39,3 +39,7 @@ fix: # Run e2e tests against live mpp-proxy (requires funded wallet) e2e: build cargo test --test live -- --ignored --nocapture +# Generate coverage locally (requires cargo-llvm-cov and llvm-tools-preview) +# Install once: `rustup component add llvm-tools-preview` and `cargo install cargo-llvm-cov` +coverage: + cargo llvm-cov --all-features --workspace --fail-under-lines 85 --lcov --output-path lcov.info diff --git a/src/wallet/keychain.rs b/src/wallet/keychain.rs index d2a18195..f02af103 100644 --- a/src/wallet/keychain.rs +++ b/src/wallet/keychain.rs @@ -45,8 +45,10 @@ pub trait KeychainBackend: Send + Sync { /// OS keychain backend using platform-native secret storage. /// /// Currently supports macOS only (via `security-framework`). +#[cfg_attr(all(test, not(target_os = "macos")), allow(dead_code))] pub struct OsKeychain; +#[cfg_attr(all(test, not(target_os = "macos")), allow(dead_code))] impl KeychainBackend for OsKeychain { fn get(&self, profile: &str) -> Result>> { #[cfg(target_os = "macos")]