aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/eval-store.sh
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 07:15:08 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 07:15:08 +0100
commit13f78c557b402422aefc09cc217b001d83f08baa (patch)
tree09cd9c8708df37bbc9bdfddcc26f20d82320e4b3 /tests/functional/eval-store.sh
parentbc34274aae277bb5b05d3e833fbdc0bd30c7250a (diff)
Merge pull request #9589 from obsidiansystems/floating-content-addressing-derivations-eval-store
Fix building CA derivations with and eval store (cherry picked from commit dfc0cee7024a082d90a4f68296f55a82dfd52126) Change-Id: I28feb5a36d4fe75f0ed3e3e2db6eb56b67d0f371
Diffstat (limited to 'tests/functional/eval-store.sh')
-rw-r--r--tests/functional/eval-store.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/functional/eval-store.sh b/tests/functional/eval-store.sh
index a34f3e82f..9937ecbce 100644
--- a/tests/functional/eval-store.sh
+++ b/tests/functional/eval-store.sh
@@ -11,7 +11,16 @@ rm -rf "$eval_store"
nix build -f dependencies.nix --eval-store "$eval_store" -o "$TEST_ROOT/result"
[[ -e $TEST_ROOT/result/foobar ]]
-(! ls $NIX_STORE_DIR/*.drv)
+if [[ ! -n "${NIX_TESTS_CA_BY_DEFAULT:-}" ]]; then
+ # Resolved CA derivations are written to store for building
+ #
+ # TODO when we something more systematic
+ # (https://github.com/NixOS/nix/issues/5025) that distinguishes
+ # between scratch storage for building and the final destination
+ # store, we'll be able to make this unconditional again -- resolved
+ # derivations should only appear in the scratch store.
+ (! ls $NIX_STORE_DIR/*.drv)
+fi
ls $eval_store/nix/store/*.drv
clearStore
@@ -26,7 +35,10 @@ rm -rf "$eval_store"
nix-build dependencies.nix --eval-store "$eval_store" -o "$TEST_ROOT/result"
[[ -e $TEST_ROOT/result/foobar ]]
-(! ls $NIX_STORE_DIR/*.drv)
+if [[ ! -n "${NIX_TESTS_CA_BY_DEFAULT:-}" ]]; then
+ # See above
+ (! ls $NIX_STORE_DIR/*.drv)
+fi
ls $eval_store/nix/store/*.drv
clearStore