Add --eval-store test

This commit is contained in:
Eelco Dolstra 2021-07-27 11:17:56 +02:00
parent 47002108d1
commit 29e4913f79
2 changed files with 28 additions and 1 deletions

26
tests/eval-store.sh Normal file
View file

@ -0,0 +1,26 @@
source common.sh
eval_store=$TEST_ROOT/eval-store
clearStore
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)
ls $eval_store/nix/store/*.drv
clearStore
rm -rf "$eval_store"
nix-instantiate dependencies.nix --eval-store "$eval_store"
(! ls $NIX_STORE_DIR/*.drv)
ls $eval_store/nix/store/*.drv
clearStore
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)
ls $eval_store/nix/store/*.drv

View file

@ -56,7 +56,8 @@ nix_tests = \
ca/nix-run.sh \ ca/nix-run.sh \
ca/recursive.sh \ ca/recursive.sh \
ca/concurrent-builds.sh \ ca/concurrent-builds.sh \
ca/nix-copy.sh ca/nix-copy.sh \
eval-store.sh
# parallel.sh # parallel.sh
install-tests += $(foreach x, $(nix_tests), tests/$(x)) install-tests += $(foreach x, $(nix_tests), tests/$(x))