about summary refs log tree commit diff
path: root/tvix/eval/tests
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-05-26T18·27+0200
committerflokli <flokli@flokli.de>2024-05-30T16·18+0000
commitc83f2e765c7cefe325cd00ee5dca25969889491a (patch)
treef73c366a57d135c6df26322ab01e5548379d57c5 /tvix/eval/tests
parent2c628f6e1cbcdc927ad7b03cef0d40ce5b675149 (diff)
fix(tvix/eval/tests/nix_oracle): tests are impure-only r/8181
This uses StdIO, which is only available when the `impure` feature is
enabled.

Change-Id: I039b1f45f6619dd099fa943e58322ff521482dfa
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11724
Tested-by: BuildkiteCI
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Diffstat (limited to 'tvix/eval/tests')
-rw-r--r--tvix/eval/tests/nix_oracle.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/tvix/eval/tests/nix_oracle.rs b/tvix/eval/tests/nix_oracle.rs
index 5a5cc0a8223f..3d3abc73635f 100644
--- a/tvix/eval/tests/nix_oracle.rs
+++ b/tvix/eval/tests/nix_oracle.rs
@@ -56,6 +56,7 @@ fn nix_eval(expr: &str, strictness: Strictness) -> String {
 /// `NIX_INSTANTIATE_BINARY_PATH` env var to resolve the `nix-instantiate` binary) and tvix, and
 /// assert that the result is identical
 #[track_caller]
+#[cfg(feature = "impure")]
 fn compare_eval(expr: &str, strictness: Strictness) {
     let nix_result = nix_eval(expr, strictness);
     let mut eval = tvix_eval::Evaluation::new_pure();
@@ -76,6 +77,7 @@ fn compare_eval(expr: &str, strictness: Strictness) {
 macro_rules! compare_eval_tests {
     ($strictness:expr, {}) => {};
     ($strictness:expr, {$(#[$meta:meta])* $test_name: ident($expr: expr); $($rest:tt)*}) => {
+        #[cfg(feature = "impure")]
         #[test]
         $(#[$meta])*
         fn $test_name() {