]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fix cli-tests issues
authorDanielle Rozenblit <drozenblit@fb.com>
Tue, 14 Feb 2023 19:33:26 +0000 (11:33 -0800)
committerDanielle Rozenblit <drozenblit@fb.com>
Tue, 14 Feb 2023 19:33:26 +0000 (11:33 -0800)
tests/cli-tests/compression/basic.sh
tests/cli-tests/compression/gzip-compat.sh
tests/cli-tests/compression/window-resize.sh

index b6e2aa0456a354423ae1b53aa292ed981e4222ae..950c5a483c5dc954c33bca02945c3da159522a06 100755 (executable)
@@ -25,8 +25,10 @@ zstd --stdout file | zstd -t
 println bob | zstd | zstd -t
 
 # Test keeping input file when compressing to stdout in gzip mode
-$ZSTD_SYMLINK_DIR/gzip -c file       | zstd -t ; test -f file
-$ZSTD_SYMLINK_DIR/gzip --stdout file | zstd -t ; test -f file
+if $(command -v $ZSTD_SYMLINK_DIR/gzip); then
+    $ZSTD_SYMLINK_DIR/gzip -c file       | zstd -t ; test -f file
+    $ZSTD_SYMLINK_DIR/gzip --stdout file | zstd -t ; test -f file
+fi
 
 # Test --rm
 cp file file-rm
index bb72e05fcc06b024348b502b693068381c500d0a..b628b35a0c7b09a6f4d103bf9655b1aa349b1fcb 100755 (executable)
@@ -6,10 +6,12 @@ set -e
 # set -v
 
 # Test gzip specific compression option
-$ZSTD_SYMLINK_DIR/gzip --fast file ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
-$ZSTD_SYMLINK_DIR/gzip --best file ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
+if $(command -v $ZSTD_SYMLINK_DIR/gzip); then
+    $ZSTD_SYMLINK_DIR/gzip --fast file ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
+    $ZSTD_SYMLINK_DIR/gzip --best file ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
 
-# Test -n / --no-name: do not embed original filename in archive
-$ZSTD_SYMLINK_DIR/gzip -n file           ; grep -qv file file.gz  ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
-$ZSTD_SYMLINK_DIR/gzip --no-name file    ; grep -qv file file.gz  ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
-$ZSTD_SYMLINK_DIR/gzip -c --no-name file | grep -qv file
+    # Test -n / --no-name: do not embed original filename in archive
+    $ZSTD_SYMLINK_DIR/gzip -n file           ; grep -qv file file.gz  ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
+    $ZSTD_SYMLINK_DIR/gzip --no-name file    ; grep -qv file file.gz  ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
+    $ZSTD_SYMLINK_DIR/gzip -c --no-name file | grep -qv file
+fi
index 3b5e6fe24f36fbae563cf9843ed1307ddce5d482..e4fe811ce78b83ae812e15a531c29983a9af9196 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 datagen -g1G > file
-zstd --long=31 -1 --single-thread --no-content-size -f file
+zstd --long=30 -1 --single-thread --no-content-size -f file
 zstd -l -v file.zst
 
 # We want to ignore stderr (its outputting "*** zstd command line interface