diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-07-27 11:17:56 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2021-07-27 11:17:56 +0200 |
commit | 29e4913f7947730c468c1d96f150648ec59f572d (patch) | |
tree | 66a23c795890a018918e19ce0224d1e6bf8a2a24 /tests | |
parent | 47002108d1b17e996d2463bbb22f9cffbc59ae71 (diff) |
Add --eval-store test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/eval-store.sh | 26 | ||||
-rw-r--r-- | tests/local.mk | 3 |
2 files changed, 28 insertions, 1 deletions
diff --git a/tests/eval-store.sh b/tests/eval-store.sh new file mode 100644 index 000000000..7bb86d77c --- /dev/null +++ b/tests/eval-store.sh @@ -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 diff --git a/tests/local.mk b/tests/local.mk index e16c5a9b7..b100e7f15 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -56,7 +56,8 @@ nix_tests = \ ca/nix-run.sh \ ca/recursive.sh \ ca/concurrent-builds.sh \ - ca/nix-copy.sh + ca/nix-copy.sh \ + eval-store.sh # parallel.sh install-tests += $(foreach x, $(nix_tests), tests/$(x)) |