forked from LnL7/nix
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from domenkozar/libcompress-tests
add tests for zstd compression
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ nix_tests = \ | |
signing.sh \ | ||
shell.sh \ | ||
brotli.sh \ | ||
zstd.sh \ | ||
pure-eval.sh \ | ||
check.sh \ | ||
plugins.sh \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ]] |