mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Add test for the evaluation cache
This commit is contained in:
parent
c90a763273
commit
8b86f415c1
2 changed files with 23 additions and 0 deletions
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'
|
|
@ -16,6 +16,7 @@ nix_tests = \
|
|||
flakes/build-paths.sh \
|
||||
flakes/flake-in-submodule.sh \
|
||||
flakes/prefetch.sh \
|
||||
flakes/eval-cache.sh \
|
||||
gc.sh \
|
||||
nix-collect-garbage-d.sh \
|
||||
remote-store.sh \
|
||||
|
|
Loading…
Reference in a new issue