diff options
author | Yorick <yorick.vanpelt@serokell.io> | 2021-04-13 21:14:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-13 21:14:16 +0200 |
commit | 88c8804b4fb2253c9970bb06d9e534c347dfea4e (patch) | |
tree | 63b57686bb7090aed47818cb81004f72d2a20ac3 /tests | |
parent | 8a0c00b85600991cdb9aa05902defec6ac44b777 (diff) | |
parent | c2dfda007e777a33cd487a5631f0d143f915dd43 (diff) |
Merge pull request #4 from domenkozar/libcompress-tests
add tests for zstd compression
Diffstat (limited to 'tests')
-rw-r--r-- | tests/local.mk | 1 | ||||
-rw-r--r-- | tests/zstd.sh | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/tests/local.mk b/tests/local.mk index aa8b4f9bf..82894af78 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -27,6 +27,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 ]] |