test-zstd test-zstd32 test-zstd-nolegacy: datagen
file $(ZSTD)
- ZSTD="$(QEMU_SYS) $(ZSTD)" ./playTests_bash.sh $($(ZSTDRTTEST)
- ZSTD="$(QEMU_SYS) $(ZSTD)" ./playTests.sh $($(ZSTDRTTEST)
-
+ ZSTD="$(QEMU_SYS) $(ZSTD)" ./playTests.sh $(ZSTDRTTEST)
test-gzstd: gzstd
rm -f tmp* dictionary
+println "\n===> zstd fifo named pipe test "
+head -c 10 /dev/zero > tmp_original
+mkfifo named_pipe
+head -c 10 /dev/zero > named_pipe &
+$ZSTD named_pipe -o tmp_compressed
+$ZSTD -d -o tmp_decompressed tmp_compressed
+$DIFF -s tmp_original tmp_decompressed
+rm -rf tmp*
+rm -rf named_pipe
+
rm -f tmp*
+++ /dev/null
-#!/bin/bash
-
-println() {
- printf '%b\n' "${*}"
-}
-
-UNAME=$(uname)
-
-isWindows=false
-INTOVOID="/dev/null"
-case "$UNAME" in
- GNU) DEVDEVICE="/dev/random" ;;
- *) DEVDEVICE="/dev/zero" ;;
-esac
-case "$OS" in
- Windows*)
- isWindows=true
- INTOVOID="NUL"
- DEVDEVICE="NUL"
- ;;
-esac
-
-case "$UNAME" in
- Darwin) MD5SUM="md5 -r" ;;
- FreeBSD) MD5SUM="gmd5sum" ;;
- OpenBSD) MD5SUM="md5" ;;
- *) MD5SUM="md5sum" ;;
-esac
-
-DIFF="diff"
-case "$UNAME" in
- SunOS) DIFF="gdiff" ;;
-esac
-
-println "\nStarting playTests_bash.sh isWindows=$isWindows ZSTD='$ZSTD'"
-
-[ -n "$ZSTD" ] || die "ZSTD variable must be defined!"
-
-println "\n===> simple tests "
-
-println "\n===> zstd fifo named pipe test "
-head -c 1M /dev/zero > tmp_original
-$ZSTD <(head -c 1M /dev/zero) -o tmp_compressed
-$ZSTD -d -o tmp_decompressed tmp_compressed
-$DIFF -s tmp_original tmp_decompressed
-rm -rf tmp*