about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-01-23T13·04+0200
committerflokli <flokli@flokli.de>2024-01-24T14·00+0000
commit8e517bc8d04da60f1851aa44000ad7400817e522 (patch)
treeea3fadeefde78f7860f961f36fb40cf3f8d3870c /tvix
parent14097aeba660c3ae4286c6dd8b26ffe78bb09ed6 (diff)
fix(tvix/eval/tests): fix eval-okay-getenv r/7445
This relies on TEST_VAR=foo being set to "foo".

Nix does this in tests/functional/lang.sh, we do it in the test suite.

Change-Id: I7ffa9ed27124530b7758aeadf07c79477656f34f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10683
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix')
-rw-r--r--tvix/eval/src/tests/mod.rs2
-rw-r--r--tvix/eval/src/tests/nix_tests/eval-okay-getenv.exp (renamed from tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-getenv.exp)0
-rw-r--r--tvix/eval/src/tests/nix_tests/eval-okay-getenv.nix (renamed from tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-getenv.nix)0
3 files changed, 2 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/mod.rs b/tvix/eval/src/tests/mod.rs
index c80368970ec1..856707119be0 100644
--- a/tvix/eval/src/tests/mod.rs
+++ b/tvix/eval/src/tests/mod.rs
@@ -40,6 +40,8 @@ mod mock_builtins {
 }
 
 fn eval_test(code_path: PathBuf, expect_success: bool) {
+    std::env::set_var("TEST_VAR", "foo"); // for eval-okay-getenv.nix
+
     eprintln!("path: {}", code_path.display());
     assert_eq!(
         code_path.extension().unwrap(),
diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-getenv.exp b/tvix/eval/src/tests/nix_tests/eval-okay-getenv.exp
index 14e24d419005..14e24d419005 100644
--- a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-getenv.exp
+++ b/tvix/eval/src/tests/nix_tests/eval-okay-getenv.exp
diff --git a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-getenv.nix b/tvix/eval/src/tests/nix_tests/eval-okay-getenv.nix
index 4cfec5f553d9..4cfec5f553d9 100644
--- a/tvix/eval/src/tests/nix_tests/notyetpassing/eval-okay-getenv.nix
+++ b/tvix/eval/src/tests/nix_tests/eval-okay-getenv.nix