about summary refs log tree commit diff
path: root/tests/binary-cache.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/binary-cache.sh')
-rw-r--r--tests/binary-cache.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/binary-cache.sh b/tests/binary-cache.sh
new file mode 100644
index 000000000000..b4a3601ece9d
--- /dev/null
+++ b/tests/binary-cache.sh
@@ -0,0 +1,19 @@
+source common.sh
+
+clearStore
+
+cacheDir=$TEST_ROOT/binary-cache
+rm -rf $cacheDir
+
+outPath=$(nix-build dependencies.nix --no-out-link)
+
+nix-push --dest $cacheDir $outPath
+
+clearStore
+
+rm -f $NIX_STATE_DIR/binary-cache*
+
+NIX_BINARY_CACHES="file://$cacheDir" nix-store -r $outPath
+
+nix-store --check-validity $outPath
+nix-store -qR $outPath | grep input-2