]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix playTests.sh Under QEMU (#1923)
authorFelix Handte <w@felixhandte.com>
Thu, 26 Dec 2019 19:16:23 +0000 (14:16 -0500)
committerYann Collet <Cyan4973@users.noreply.github.com>
Thu, 26 Dec 2019 19:16:23 +0000 (11:16 -0800)
tests/Makefile
tests/playTests.sh

index 3917a7cf8ac501504000305c7fda5b8e77bee878..e50edbc83bea7d8a1cb4ae5eabf5789516d35f9d 100644 (file)
@@ -330,7 +330,7 @@ test-zstd-nolegacy: zstd-nolegacy
 
 test-zstd test-zstd32 test-zstd-nolegacy: datagen
        file $(ZSTD)
-       ZSTD="$(QEMU_SYS) $(ZSTD)" ./playTests.sh $(ZSTDRTTEST)
+       EXE_PREFIX="$(QEMU_SYS)" ZSTD_BIN="$(ZSTD)" ./playTests.sh $(ZSTDRTTEST)
 
 
 test-gzstd: gzstd
index 9e0d75d6c7d2a419c91c4d133fb4865bf92051c8..d0943e1bbd2b55c5c1109122ef382e09220de570 100755 (executable)
@@ -102,9 +102,11 @@ case "$UNAME" in
   SunOS) DIFF="gdiff" ;;
 esac
 
-println "\nStarting playTests.sh isWindows=$isWindows ZSTD='$ZSTD'"
+println "\nStarting playTests.sh isWindows=$isWindows EXE_PREFIX='$EXE_PREFIX' ZSTD_BIN='$ZSTD_BIN'"
 
-[ -n "$ZSTD" ] || die "ZSTD variable must be defined!"
+[ -n "$ZSTD_BIN" ] || die "ZSTD_BIN variable must be defined!"
+
+ZSTD="$EXE_PREFIX $ZSTD_BIN"
 
 if echo hello | $ZSTD -v -T2 2>&1 > $INTOVOID | grep -q 'multi-threading is disabled'
 then
@@ -493,19 +495,19 @@ cat hello.zstd world.zstd > helloworld.zstd
 $ZSTD -dc helloworld.zstd > result.tmp
 $DIFF helloworld.tmp result.tmp
 println "testing zstdcat symlink"
-ln -sf $ZSTD zstdcat
-./zstdcat helloworld.zstd > result.tmp
+ln -sf $ZSTD_BIN zstdcat
+$EXE_PREFIX ./zstdcat helloworld.zstd > result.tmp
 $DIFF helloworld.tmp result.tmp
 ln -s helloworld.zstd helloworld.link.zstd
-./zstdcat helloworld.link.zstd > result.tmp
+$EXE_PREFIX ./zstdcat helloworld.link.zstd > result.tmp
 $DIFF helloworld.tmp result.tmp
 rm zstdcat
 rm result.tmp
 println "testing zcat symlink"
-ln -sf $ZSTD zcat
-./zcat helloworld.zstd > result.tmp
+ln -sf $ZSTD_BIN zcat
+$EXE_PREFIX ./zcat helloworld.zstd > result.tmp
 $DIFF helloworld.tmp result.tmp
-./zcat helloworld.link.zstd > result.tmp
+$EXE_PREFIX ./zcat helloworld.link.zstd > result.tmp
 $DIFF helloworld.tmp result.tmp
 rm zcat
 rm ./*.tmp ./*.zstd