]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Adding shell test and removing bash test file 1839/head
authorBimba Shrestha <bimbashrestha@fb.com>
Wed, 23 Oct 2019 00:09:44 +0000 (17:09 -0700)
committerBimba Shrestha <bimbashrestha@fb.com>
Wed, 23 Oct 2019 00:09:44 +0000 (17:09 -0700)
tests/Makefile
tests/playTests.sh
tests/playTests_bash.sh [deleted file]

index 123bd6312a570f0f2f682b476c4311b3b2773601..bd2f909769cb632f3e23feaa7a6e14604500bada 100644 (file)
@@ -335,9 +335,7 @@ test-zstd-nolegacy: zstd-nolegacy
 
 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
index 5a47ceb5e0d4e0963c4626fcda65acb73f441d78..29ac1faa5547551bd565959194367f1c0e43438d 100755 (executable)
@@ -1080,4 +1080,14 @@ test -f dictionary
 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*
diff --git a/tests/playTests_bash.sh b/tests/playTests_bash.sh
deleted file mode 100755 (executable)
index 68bd17e..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/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*