From: Dan Kegel Date: Wed, 10 Jun 2020 15:41:07 +0000 (-0700) Subject: Makefile: fail minigzip test if minigzip aborts X-Git-Tag: 1.9.9-b1~213 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=959eda5c152da37038dd49e3774337f3fc3e1459;p=thirdparty%2Fzlib-ng.git Makefile: fail minigzip test if minigzip aborts Pipeline exit status ignores all but the last process in the pipeline, so break up the pipeline so we can see minigzip's exit status. Also fix ancient quoting bug; intention was likely to use shell $$ variable to uniquify temp file name. --- diff --git a/test/Makefile.in b/test/Makefile.in index 1a75d69e1..fc1e0c70d 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -46,26 +46,28 @@ fuzzer: endif teststatic: check_cross_dep - @TMPST=tmpst_$$; \ - if echo hello world | ${QEMU_RUN} ../minigzip$(EXE) | ${QEMU_RUN} ../minigzip$(EXE) -d && ${QEMU_RUN} ../example$(EXE) $$TMPST ; then \ + @TMPST=tmpst_$$$$; \ + HELLOST=tmphellost_$$$$; \ + if echo hello world | ${QEMU_RUN} ../minigzip$(EXE) > $$HELLOST && ${QEMU_RUN} ../minigzip$(EXE) -d < $$HELLOST && ${QEMU_RUN} ../example$(EXE) $$TMPST ; then \ echo ' *** zlib test OK ***'; \ else \ echo ' *** zlib test FAILED ***'; exit 1; \ - fi - @rm -f tmpst_$$ + fi; \ + rm -f $$TMPST $$HELLOST testshared: check_cross_dep @LD_LIBRARY_PATH=`pwd`/..:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ LD_LIBRARYN32_PATH=`pwd`/..:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \ DYLD_LIBRARY_PATH=`pwd`/..:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \ SHLIB_PATH=`pwd`/..:$(SHLIB_PATH) ; export SHLIB_PATH; \ - TMPSH=tmpsh_$$; \ - if echo hello world | ${QEMU_RUN} ../minigzipsh$(EXE) | ${QEMU_RUN} ../minigzipsh$(EXE) -d && ${QEMU_RUN} ../examplesh$(EXE) $$TMPSH; then \ + TMPSH=tmpsh_$$$$; \ + HELLOSH=tmphellosh_$$$$; \ + if echo hello world | ${QEMU_RUN} ../minigzipsh$(EXE) > $$HELLOSH && ${QEMU_RUN} ../minigzipsh$(EXE) -d < $$HELLOSH && ${QEMU_RUN} ../examplesh$(EXE) $$TMPSH; then \ echo ' *** zlib shared test OK ***'; \ else \ echo ' *** zlib shared test FAILED ***'; exit 1; \ - fi - @rm -f tmpsh_$$ + fi; \ + rm -f $$TMPSH $$HELLOSH cvetests: testCVEinputs