1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00

Add test for the evaluation cache

(cherry picked from commit 8b86f415c1)
This commit is contained in:
Eelco Dolstra 2024-05-24 16:16:38 +02:00 committed by éclairevoyant
parent e154f412b7
commit e3c55dd0d3
No known key found for this signature in database
GPG key ID: E3813AEAA02DB54B
2 changed files with 23 additions and 0 deletions

View 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'

View file

@ -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 \