aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2021-04-15 13:39:04 +0200
committerEelco Dolstra <edolstra@gmail.com>2021-04-15 13:39:04 +0200
commit6fb75824137de8af12491558c72d2eabc348f6f4 (patch)
tree9870c29c0c11453bdde0437b4a03a3c2ba902ecb /tests
parentf716779c1f3426763fb75cd7f80edfc99e442d50 (diff)
parent88c8804b4fb2253c9970bb06d9e534c347dfea4e (diff)
Merge branch 'libarchive-decompress' of https://github.com/serokell/nix
Diffstat (limited to 'tests')
-rw-r--r--tests/local.mk1
-rw-r--r--tests/zstd.sh28
2 files changed, 29 insertions, 0 deletions
diff --git a/tests/local.mk b/tests/local.mk
index e7e85f97e..e2c94dde6 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -30,6 +30,7 @@ nix_tests = \
signing.sh \
shell.sh \
brotli.sh \
+ zstd.sh \
pure-eval.sh \
check.sh \
plugins.sh \
diff --git a/tests/zstd.sh b/tests/zstd.sh
new file mode 100644
index 000000000..ba7c20501
--- /dev/null
+++ b/tests/zstd.sh
@@ -0,0 +1,28 @@
+source common.sh
+
+clearStore
+clearCache
+
+cacheURI="file://$cacheDir?compression=zstd"
+
+outPath=$(nix-build dependencies.nix --no-out-link)
+
+nix copy --to $cacheURI $outPath
+
+HASH=$(nix hash path $outPath)
+
+clearStore
+clearCacheCache
+
+nix copy --from $cacheURI $outPath --no-check-sigs
+
+if ls $cacheDir/nar/*.zst &> /dev/null; then
+ echo "files do exist"
+else
+ echo "nars do not exist"
+ exit 1
+fi
+
+HASH2=$(nix hash path $outPath)
+
+[[ $HASH = $HASH2 ]]