mirror of
https://github.com/NixOS/nix
synced 2025-07-07 14:21:48 +02:00
add tests for zstd compression
This commit is contained in:
parent
8a0c00b856
commit
c2dfda007e
3 changed files with 32 additions and 0 deletions
|
@ -27,6 +27,7 @@ nix_tests = \
|
|||
signing.sh \
|
||||
shell.sh \
|
||||
brotli.sh \
|
||||
zstd.sh \
|
||||
pure-eval.sh \
|
||||
check.sh \
|
||||
plugins.sh \
|
||||
|
|
28
tests/zstd.sh
Normal file
28
tests/zstd.sh
Normal file
|
@ -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 ]]
|
Loading…
Add table
Add a link
Reference in a new issue