aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/eval-store.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/eval-store.sh')
-rw-r--r--tests/functional/eval-store.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/functional/eval-store.sh b/tests/functional/eval-store.sh
new file mode 100644
index 000000000..8fc859730
--- /dev/null
+++ b/tests/functional/eval-store.sh
@@ -0,0 +1,30 @@
+source common.sh
+
+# Using `--eval-store` with the daemon will eventually copy everything
+# to the build store, invalidating most of the tests here
+needLocalStore "“--eval-store” doesn't achieve much with the daemon"
+
+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