diff options
author | Ryan Lahfa <tvl@lahfa.xyz> | 2024-03-25T00·25+0100 |
---|---|---|
committer | raitobezarius <tvl@lahfa.xyz> | 2024-04-04T17·24+0000 |
commit | e7af8e0d62603f5fdf85307dc57b2c9599aa1936 (patch) | |
tree | 57f8f4e4c5036b77c42b47549c3f966c5743d089 /tvix/glue | |
parent | e9a23bb4782615722374e7bec643cba669a492bc (diff) |
feat(tvix/eval): implement `appendContext` r/7851
`appendContext s ctx` will just append a user-crafted context attrs to `s`. The most important part of this builtin is to perform all the relevant invariant validations to avoid letting the user craft invalid contexts which can never be built, e.g. invalid store paths, inexistent derivations, etc. This version is incomplete and full of TODOs, but passes all the Nix's context strings tests, so we turn them on. Change-Id: I625dc5e7c4f5b784f078b390f04b0ee5a8d65a7c Signed-off-by: Ryan Lahfa <tvl@lahfa.xyz> Reviewed-on: https://cl.tvl.fyi/c/depot/+/11263 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/glue')
-rw-r--r-- | tvix/glue/src/tests/mod.rs | 16 | ||||
-rw-r--r-- | tvix/glue/src/tests/nix_tests/eval-okay-context-introspection.exp (renamed from tvix/glue/src/tests/nix_tests/notyetpassing/eval-okay-context-introspection.exp) | 0 | ||||
-rw-r--r-- | tvix/glue/src/tests/nix_tests/eval-okay-context-introspection.nix (renamed from tvix/glue/src/tests/nix_tests/notyetpassing/eval-okay-context-introspection.nix) | 0 |
3 files changed, 10 insertions, 6 deletions
diff --git a/tvix/glue/src/tests/mod.rs b/tvix/glue/src/tests/mod.rs index 469ed17a51..e66f484e3d 100644 --- a/tvix/glue/src/tests/mod.rs +++ b/tvix/glue/src/tests/mod.rs @@ -134,9 +134,13 @@ fn nix_eval_okay(#[files("src/tests/nix_tests/eval-okay-*.nix")] code_path: Path // notyetpassing; this makes the test suite much more useful for // regression testing, since there should always be zero non-ignored // failing tests. -#[rstest] -fn nix_eval_okay_currently_failing( - #[files("src/tests/nix_tests/notyetpassing/eval-okay-*.nix")] code_path: PathBuf, -) { - eval_test(code_path, false) -} +// +// NOTE: There's no such test anymore. `rstest` does not handle empty directories, so, we +// just comment it for now. +// +// #[rstest] +// fn nix_eval_okay_currently_failing( +// #[files("src/tests/nix_tests/notyetpassing/eval-okay-*.nix")] code_path: PathBuf, +// ) { +// eval_test(code_path, false) +// } diff --git a/tvix/glue/src/tests/nix_tests/notyetpassing/eval-okay-context-introspection.exp b/tvix/glue/src/tests/nix_tests/eval-okay-context-introspection.exp index 03b400cc88..03b400cc88 100644 --- a/tvix/glue/src/tests/nix_tests/notyetpassing/eval-okay-context-introspection.exp +++ b/tvix/glue/src/tests/nix_tests/eval-okay-context-introspection.exp diff --git a/tvix/glue/src/tests/nix_tests/notyetpassing/eval-okay-context-introspection.nix b/tvix/glue/src/tests/nix_tests/eval-okay-context-introspection.nix index 354376b895..354376b895 100644 --- a/tvix/glue/src/tests/nix_tests/notyetpassing/eval-okay-context-introspection.nix +++ b/tvix/glue/src/tests/nix_tests/eval-okay-context-introspection.nix |