nix/tests/functional/zstd.sh

36 lines
607 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2021-04-09 21:13:08 +00:00
source common.sh
TODO_NixOS
2021-04-09 21:13:08 +00:00
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
2024-10-08 14:35:53 +00:00
nix copy --from $cacheURI $outPath --no-check-sigs --profile $TEST_ROOT/profile --out-link $TEST_ROOT/result
[[ -e $TEST_ROOT/profile ]]
2024-10-08 14:35:53 +00:00
[[ -e $TEST_ROOT/result ]]
2021-04-09 21:13:08 +00:00
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 ]]