From 8b86f415c1a8565085e70475933e459a29d67283 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 24 May 2024 16:16:38 +0200 Subject: [PATCH] Add test for the evaluation cache --- tests/functional/flakes/eval-cache.sh | 22 ++++++++++++++++++++++ tests/functional/local.mk | 1 + 2 files changed, 23 insertions(+) create mode 100644 tests/functional/flakes/eval-cache.sh diff --git a/tests/functional/flakes/eval-cache.sh b/tests/functional/flakes/eval-cache.sh new file mode 100644 index 000000000..90c7abd3c --- /dev/null +++ b/tests/functional/flakes/eval-cache.sh @@ -0,0 +1,22 @@ +source ./common.sh + +requireGit + +flake1Dir="$TEST_ROOT/eval-cache-flake" + +createGitRepo "$flake1Dir" "" + +cat >"$flake1Dir/flake.nix" <&1 | grepQuiet 'error: breaks' +expect 1 nix build "$flake1Dir#foo.bar" 2>&1 | grepQuiet 'error: breaks' diff --git a/tests/functional/local.mk b/tests/functional/local.mk index 18b920f7d..9c279b49b 100644 --- a/tests/functional/local.mk +++ b/tests/functional/local.mk @@ -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 \