From 101b86b48e7954213ad7c2cb9c18df03af5acf9b Mon Sep 17 00:00:00 2001 From: "Jason N." <33561705+JasonN3@users.noreply.github.com> Date: Mon, 4 Mar 2024 18:32:09 -0500 Subject: [PATCH] move iso tests to Makefile --- .github/workflows/build-and-test.yml | 13 ++----------- Makefile | 5 +++++ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index f60a5b5..238ca9d 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -117,7 +117,7 @@ jobs: - name: Ensure qemu is installed run: | sudo apt-get update - sudo apt-get install -y qemu qemu-utils xorriso unzip qemu-system-x86 netcat socat jq isomd5sum ansible + sudo apt-get install -y qemu qemu-utils xorriso unzip qemu-system-x86 netcat socat jq isomd5sum ansible make - name: Create disk run: | @@ -134,16 +134,7 @@ jobs: - name: Run ISO checks run: | set -ex - pwd - ls - for check in $(ls tests/iso/*) - do - if [[ -f $check && $check != "README.md" ]] - then - chmod +x $check - ./${check} ${{ env.IMAGE_NAME }}-${{ env.VERSION }}.iso - fi - done + make test-iso - name: Add Kickstart and Grub options to ISO run: | diff --git a/Makefile b/Makefile index 0ef451f..c4d403a 100644 --- a/Makefile +++ b/Makefile @@ -101,6 +101,11 @@ clean: install-deps: dnf install -y lorax xorriso podman + +test-iso: + _TESTS = $(filter-out README.md,$(shell ls tests/iso)) + $(foreach test,$(_TESTS),chmod +x tests/iso/$(test)) + $(foreach test,$(_TESTS),./tests/iso/$(test) deploy.iso) .PHONY: clean install-deps