Skip to content

Commit

Permalink
tests: use test_with and skip tests that need mkcomposefs
Browse files Browse the repository at this point in the history
This commit adds the `test_with` crate and skips the tests that
require `mkcomposefs`.

It uses use the minimal configuration of `tests_with` and with that
we now pull in 229 `cargo tree` lines vs the pervious 217 (fwiw,
the default configuration of tests_with incrases the crates from
217 to 497). Even the extra 12 might be too much for this tiny
feature, feel free to close again if you feel this is not worth it.

Signed-off-by: Michael Vogt <[email protected]>
  • Loading branch information
mvo5 authored and allisonkarlitskaya committed Jan 13, 2025
1 parent 55ae2e9 commit 94d4ce8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ zstd = "0.13.2"

[dev-dependencies]
similar-asserts = "1.6.0"
test-with = { version = "0.14", default-features = false, features = ["executable"] }

[profile.dev.package.sha2]
# this is *really* slow otherwise
Expand Down
2 changes: 2 additions & 0 deletions src/dumpfile_parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,7 @@ mod tests {
}
}

#[test_with::executable(mkcomposefs)]
#[test]
fn test_load_cfs() -> Result<()> {
let mut tmpf = tempfile::tempfile()?;
Expand All @@ -879,6 +880,7 @@ mod tests {
Ok(())
}

#[test_with::executable(mkcomposefs)]
#[test]
fn test_load_cfs_filtered() -> Result<()> {
const FILTERED: &str =
Expand Down

0 comments on commit 94d4ce8

Please sign in to comment.