Skip to content

Commit 093099f

Browse files
committed
mdbook-cmdrun: skip tests that require hardcoded binary paths
Skip two tests that fail in the Nix sandbox because they attempt to invoke the built binary from a hardcoded relative path (../../target/debug/mdbook-cmdrun) which doesn't exist in the Nix build environment where the binary is at target/release/mdbook-cmdrun. The tests build_test_book and build_test_book_with_dynamic_src are integration tests that test mdbook's interaction with the preprocessor, but they make assumptions about the build directory structure that don't hold in Nix.
1 parent 194ba32 commit 093099f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pkgs/by-name/md/mdbook-cmdrun/package.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ rustPlatform.buildRustPackage {
2828

2929
cargoHash = "sha256-C3Rg+WXHBA7KyUDFdhBz4mOm8CFH/f7UVA8KOLs9ClE=";
3030

31+
checkFlags = [
32+
# Tests try to invoke binary from hardcoded relative path (../../target/debug/mdbook-cmdrun)
33+
# which doesn't work in Nix sandbox
34+
"--skip=build_test_book"
35+
"--skip=build_test_book_with_dynamic_src"
36+
];
37+
3138
meta = {
3239
description = "mdbook preprocessor to run arbitrary commands";
3340
mainProgram = "mdbook-cmdrun";

0 commit comments

Comments
 (0)