diff options
author | Florian Klink <flokli@flokli.de> | 2022-08-12T14·10+0700 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2022-09-11T14·31+0000 |
commit | 43a2eaa1b6e74574b2f7672340d0ac1aff03a0e2 (patch) | |
tree | 9168e2196fb59931cd7650e6b17c7e0e8c35e30e | |
parent | e6a6b0dccbf3a49088944a30cf43812d94a27302 (diff) |
chore(tvix/nix_cli): build with tests r/4816
only run test_nix_store_add() when the feature integration_tests is enabled. Change-Id: I600f08ecaefe1ce77651ae07a58d7987107ab969 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6084 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
-rw-r--r-- | tvix/nix_cli/Cargo.toml | 3 | ||||
-rw-r--r-- | tvix/nix_cli/default.nix | 3 | ||||
-rw-r--r-- | tvix/nix_cli/src/bin/nix-store.rs | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/tvix/nix_cli/Cargo.toml b/tvix/nix_cli/Cargo.toml index b1d1d339b45f..c0b85e56b89e 100644 --- a/tvix/nix_cli/Cargo.toml +++ b/tvix/nix_cli/Cargo.toml @@ -12,3 +12,6 @@ version = "3.2.0" [[bin]] name = "nix-store" + +[features] +integration_tests = [] diff --git a/tvix/nix_cli/default.nix b/tvix/nix_cli/default.nix index 7781daf6c5c6..5fbd61f0746c 100644 --- a/tvix/nix_cli/default.nix +++ b/tvix/nix_cli/default.nix @@ -3,6 +3,5 @@ depot.third_party.naersk.buildPackage { src = ./.; doDoc = false; - # Tests invoke nix-store binary - doCheck = false; + doCheck = true; } diff --git a/tvix/nix_cli/src/bin/nix-store.rs b/tvix/nix_cli/src/bin/nix-store.rs index e1568fff73f0..8d008a414dc4 100644 --- a/tvix/nix_cli/src/bin/nix-store.rs +++ b/tvix/nix_cli/src/bin/nix-store.rs @@ -80,6 +80,7 @@ mod integration_tests { } #[test] + #[cfg_attr(not(feature = "integration_tests"), ignore)] fn test_nix_store_add() { let file_content = "I am a copied file"; let mut tempfile = tempfile::NamedTempFile::new().expect("cannot create temp file"); |