about summary refs log tree commit diff
path: root/tvix/eval/src/tests/mod.rs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2022-10-08T17·48-0400
committergrfn <grfn@gws.fyi>2022-10-08T19·02+0000
commitb4d978cd6aeeac25897dc86b437fd2e96827626f (patch)
treee3017c05ee36156b92e4589065dd5f1466c2bd7e /tvix/eval/src/tests/mod.rs
parent278bccc1ea3542610012177171234ad1c3c44dcf (diff)
feat(tvix/tests): Import default.nix inside directory r/5068
This requires actually passing the source directory into `interpret` in
the eval tests, but otherwise this is fairly straightforward - if we're
trying to import a directory, just push `default.nix` onto it and import
that instead.

Change-Id: I0b7d4234f81977e78d14dfa651bf0cf9721017e5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6893
Autosubmit: grfn <grfn@gws.fyi>
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/tests/mod.rs')
-rw-r--r--tvix/eval/src/tests/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/eval/src/tests/mod.rs b/tvix/eval/src/tests/mod.rs
index 49ca35973e56..8540a5641bcf 100644
--- a/tvix/eval/src/tests/mod.rs
+++ b/tvix/eval/src/tests/mod.rs
@@ -12,7 +12,7 @@ fn eval_okay_test(code_path: &str) {
     let code = std::fs::read_to_string(code_path).expect("should be able to read test code");
     let exp = std::fs::read_to_string(exp_path).expect("should be able to read test expectation");
 
-    let result = interpret(&code, None, Default::default())
+    let result = interpret(&code, Some(code_path.into()), Default::default())
         .expect("evaluation of eval-okay test should succeed");
     let result_str = format!("{}", result);