mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 16:23:02 +00:00
Add test for the evaluation cache
(cherry picked from commit 8b86f415c1
)
This commit is contained in:
parent
e154f412b7
commit
e3c55dd0d3
22
tests/functional/flakes/eval-cache.sh
Normal file
22
tests/functional/flakes/eval-cache.sh
Normal file
@ -0,0 +1,22 @@
|
||||
source ./common.sh
|
||||
|
||||
requireGit
|
||||
|
||||
flake1Dir="$TEST_ROOT/eval-cache-flake"
|
||||
|
||||
createGitRepo "$flake1Dir" ""
|
||||
|
||||
cat >"$flake1Dir/flake.nix" <<EOF
|
||||
{
|
||||
description = "Fnord";
|
||||
outputs = { self }: {
|
||||
foo.bar = throw "breaks";
|
||||
};
|
||||
}
|
||||
EOF
|
||||
|
||||
git -C "$flake1Dir" add flake.nix
|
||||
git -C "$flake1Dir" commit -m "Init"
|
||||
|
||||
expect 1 nix build "$flake1Dir#foo.bar" 2>&1 | grepQuiet 'error: breaks'
|
||||
expect 1 nix build "$flake1Dir#foo.bar" 2>&1 | grepQuiet 'error: breaks'
|
@ -14,6 +14,7 @@ nix_tests = \
|
||||
flakes/absolute-paths.sh \
|
||||
flakes/build-paths.sh \
|
||||
flakes/flake-in-submodule.sh \
|
||||
flakes/eval-cache.sh \
|
||||
gc.sh \
|
||||
nix-collect-garbage-d.sh \
|
||||
remote-store.sh \
|
||||
|
Loading…
Reference in New Issue
Block a user