CI: Run test applications against QEMU.

This commit is contained in:
Nathan Moinvaziri 2022-10-11 11:10:17 -07:00 committed by Mark Adler
parent b85c172e1d
commit da6f1623c1
2 changed files with 6 additions and 4 deletions

View File

@ -78,6 +78,8 @@ jobs:
make test make test
make cover make cover
working-directory: ${{ matrix.build-dir }} working-directory: ${{ matrix.build-dir }}
env:
QEMU_RUN: ${{ matrix.qemu-run }}
- name: Upload build errors - name: Upload build errors
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3

View File

@ -83,7 +83,7 @@ test: all teststatic testshared
teststatic: static teststatic: static
@TMPST=tmpst_$$; \ @TMPST=tmpst_$$; \
if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \ if echo hello world | ${QEMU_RUN} ./minigzip | ${QEMU_RUN} ./minigzip -d && ${QEMU_RUN} ./example $$TMPST ; then \
echo ' *** zlib test OK ***'; \ echo ' *** zlib test OK ***'; \
else \ else \
echo ' *** zlib test FAILED ***'; false; \ echo ' *** zlib test FAILED ***'; false; \
@ -96,7 +96,7 @@ testshared: shared
DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \ DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \ SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
TMPSH=tmpsh_$$; \ TMPSH=tmpsh_$$; \
if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh $$TMPSH; then \ if echo hello world | ${QEMU_RUN} ./minigzipsh | ${QEMU_RUN} ./minigzipsh -d && ${QEMU_RUN} ./examplesh $$TMPSH; then \
echo ' *** zlib shared test OK ***'; \ echo ' *** zlib shared test OK ***'; \
else \ else \
echo ' *** zlib shared test FAILED ***'; false; \ echo ' *** zlib shared test FAILED ***'; false; \
@ -105,7 +105,7 @@ testshared: shared
test64: all64 test64: all64
@TMP64=tmp64_$$; \ @TMP64=tmp64_$$; \
if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \ if echo hello world | ${QEMU_RUN} ./minigzip64 | ${QEMU_RUN} ./minigzip64 -d && ${QEMU_RUN} ./example64 $$TMP64; then \
echo ' *** zlib 64-bit test OK ***'; \ echo ' *** zlib 64-bit test OK ***'; \
else \ else \
echo ' *** zlib 64-bit test FAILED ***'; false; \ echo ' *** zlib 64-bit test FAILED ***'; false; \
@ -120,7 +120,7 @@ infcover: infcover.o libz.a
cover: infcover cover: infcover
rm -f *.gcda rm -f *.gcda
./infcover ${QEMU_RUN} ./infcover
gcov inf*.c gcov inf*.c
libz.a: $(OBJS) libz.a: $(OBJS)