mirror of
https://github.com/facebook/zstd.git
synced 2025-10-15 00:02:02 -04:00
Adding shell test and removing bash test file
This commit is contained in:
parent
edae3c8f3c
commit
10f7147013
@ -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
|
||||
|
@ -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*
|
||||
|
@ -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*
|
Loading…
x
Reference in New Issue
Block a user