diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 1ad69ec..cae216e 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -178,11 +178,13 @@ jobs: - name: Verify ISO run: | + set -e checkisomd5 ${{ needs['build-and-push-iso']['outputs'][format('iso_name-{0}', matrix.version)] }} sha256sum -c ${{ needs['build-and-push-iso']['outputs'][format('iso_name-{0}', matrix.version)] }}-CHECKSUM - name: Run ISO checks run: | + set -e mv ${{ needs['build-and-push-iso']['outputs'][format('iso_name-{0}', matrix.version)] }} deploy.iso make test-iso \ ARCH=${{ env.ARCH}} \ @@ -197,6 +199,7 @@ jobs: - name: Add Kickstart and Grub options to ISO run: | + set -e sudo mkdir /mnt/iso || true sudo mount -o loop deploy.iso /mnt/iso cp /mnt/iso/boot/grub2/grub.cfg grub.cfg @@ -227,7 +230,8 @@ jobs: - name: Install the test VM run: | - timeout 1h qemu-system-x86_64 -name "Anaconda" -boot d -m 4096 -cpu qemu64 -display none -cdrom test.iso -smp 2 -hda disk.qcow2 -serial telnet:localhost:4321,server,nowait & QEMU_PID=$! + set -e + timeout 1h qemu-system-x86_64 -name "Anaconda" -boot d -m 4096 -cpu qemu64 -display none -cdrom test.iso -smp 2 -hda disk.qcow2 -serial telnet:localhost:4321,server=on,wait=off & QEMU_PID=$! echo "PID: $QEMU_PID" timeout 1m bash -c "while ! (echo > /dev/tcp/127.0.0.1/4321); do sleep 0.1; done" (nc localhost 4321 | tee vm.stdout) & @@ -240,15 +244,16 @@ jobs: VM_IP: "127.0.0.1" VM_PORT: "5555" run: | + set -e mkfifo vm.stdin qemu-system-x86_64 -name "Anaconda" \ -m 4096 -cpu qemu64 -display none -smp 2 \ - -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 \ + -chardev socket,path=/tmp/qga.sock,server=on,wait=off,id=qga0 \ -device e1000,netdev=net0 \ -netdev user,id=net0,hostfwd=tcp::${VM_PORT}-:22 \ -device virtio-serial \ -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 \ - -boot c -hda disk.qcow2 -serial telnet:localhost:4321,server,nowait & export QEMU_PID=$! + -boot c -hda disk.qcow2 -serial telnet:localhost:4321,server=on,wait=off & export QEMU_PID=$! echo "PID: $QEMU_PID" timeout 1m bash -c "while ! (echo > /dev/tcp/127.0.0.1/4321); do sleep 0.1; done" diff --git a/Makefile b/Makefile index d797b7a..7c18e8f 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ get_templates = $(shell ls lorax_templates/$(1)_*.tmpl) \ # Get a list of tests for the feature # $1 = test type # $2 = feature -run_tests = tests=$(shell ls tests/$(1)/$(2)_*); \ +run_tests = tests="$(shell ls tests/$(1)/$(2)_*)"; \ if [ -n "$$tests" ]; \ then \ chmod +x $$tests; \