Adding shell test and removing bash test file

This commit is contained in:
Bimba Shrestha 2019-10-22 17:09:44 -07:00
parent edae3c8f3c
commit 10f7147013
3 changed files with 11 additions and 49 deletions

View 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

View File

@ -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*

View File

@ -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*