From da6f1623c177c5ebfa2b1ee3b50eb297da5a77e1 Mon Sep 17 00:00:00 2001 From: Nathan Moinvaziri Date: Tue, 11 Oct 2022 11:10:17 -0700 Subject: [PATCH] CI: Run test applications against QEMU. --- .github/workflows/configure.yml | 2 ++ Makefile.in | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/configure.yml b/.github/workflows/configure.yml index c34a82c..dcdd4b5 100644 --- a/.github/workflows/configure.yml +++ b/.github/workflows/configure.yml @@ -78,6 +78,8 @@ jobs: make test make cover working-directory: ${{ matrix.build-dir }} + env: + QEMU_RUN: ${{ matrix.qemu-run }} - name: Upload build errors uses: actions/upload-artifact@v3 diff --git a/Makefile.in b/Makefile.in index 2dedc44..f97efc2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -83,7 +83,7 @@ test: all teststatic testshared teststatic: static @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 ***'; \ else \ echo ' *** zlib test FAILED ***'; false; \ @@ -96,7 +96,7 @@ testshared: shared 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 | ./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 ***'; \ else \ echo ' *** zlib shared test FAILED ***'; false; \ @@ -105,7 +105,7 @@ testshared: shared test64: all64 @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 ***'; \ else \ echo ' *** zlib 64-bit test FAILED ***'; false; \ @@ -120,7 +120,7 @@ infcover: infcover.o libz.a cover: infcover rm -f *.gcda - ./infcover + ${QEMU_RUN} ./infcover gcov inf*.c libz.a: $(OBJS)