diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2026-02-23 16:02:17 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-23 16:02:17 +0200 |
| commit | 8d845b76359e4ec3e6a4cdb4151b01387c0bf0b2 (patch) | |
| tree | 40e57e7b1e3423d6be30c4276de63489fc4d2712 /Makefile | |
| parent | dd3079b4e0a57ffa162c411493097a80b4e29bc0 (diff) | |
| parent | 84b87400edcdff85f701c819daf6eeceb3805d0b (diff) | |
| download | vyos-build-8d845b76359e4ec3e6a4cdb4151b01387c0bf0b2.tar.gz vyos-build-8d845b76359e4ec3e6a4cdb4151b01387c0bf0b2.zip | |
Merge pull request #1122 from c-po/qemu-arm64
Makefile: T8294: autodetect CPU architecture for smoketests
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 37 |
1 files changed, 19 insertions, 18 deletions
@@ -1,8 +1,9 @@ SHELL := /bin/bash - -arch ?= $(shell dpkg --print-architecture 2>/dev/null || echo amd64) build_dir := build +ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) +ISO_PATH := $(build_dir)/live-image-$(ARCH).hybrid.iso + .PHONY: all all: @echo "Make what specifically?" @@ -14,60 +15,60 @@ all: .PHONY: checkiso .ONESHELL: checkiso: - if [ ! -f build/live-image-$(arch).hybrid.iso ]; then - echo "Could not find build/live-image-$(arch).hybrid.iso" + if [ ! -f $(ISO_PATH) ]; then + echo "Could not find $(ISO_PATH)" exit 1 fi .PHONY: test .ONESHELL: test: checkiso - scripts/check-qemu-install --debug --configd --match="$(MATCH)" --smoketest --uefi --cpu 4 --memory 8 --iso build/live-image-amd64.hybrid.iso $(filter-out $@,$(MAKECMDGOALS)) + scripts/check-qemu-install --debug --configd --match="$(MATCH)" --smoketest --uefi --cpu 4 --memory 8 --iso $(ISO_PATH) $(filter-out $@,$(MAKECMDGOALS)) .PHONY: test-no-interfaces .ONESHELL: test-no-interfaces: checkiso - scripts/check-qemu-install --debug --configd --smoketest --uefi --no-interfaces --cpu 4 --memory 8 --huge-page-size 2M --huge-page-count 1800 --iso build/live-image-amd64.hybrid.iso + scripts/check-qemu-install --debug --configd --smoketest --uefi --no-interfaces --cpu 4 --memory 8 --huge-page-size 2M --huge-page-count 1800 --iso $(ISO_PATH) $(filter-out $@,$(MAKECMDGOALS)) .PHONY: test-no-interfaces-no-vpp .ONESHELL: test-no-interfaces-no-vpp: checkiso - scripts/check-qemu-install --debug --configd --smoketest --uefi --no-interfaces --no-vpp --arch $(arch) --iso build/live-image-$(arch).hybrid.iso + scripts/check-qemu-install --debug --configd --smoketest --uefi --no-interfaces --no-vpp --iso $(ISO_PATH) $(filter-out $@,$(MAKECMDGOALS)) .PHONY: test-interfaces .ONESHELL: test-interfaces: checkiso - scripts/check-qemu-install --debug --configd --match="interfaces_" --smoketest --uefi --iso build/live-image-amd64.hybrid.iso + scripts/check-qemu-install --debug --configd --match="interfaces_" --smoketest --uefi --iso $(ISO_PATH) $(filter-out $@,$(MAKECMDGOALS)) .PHONY: test-vpp .ONESHELL: test-vpp: checkiso - scripts/check-qemu-install --debug --configd --match="vpp" --smoketest --uefi --cpu 4 --memory 8 --huge-page-size 2M --huge-page-count 1800 --iso build/live-image-amd64.hybrid.iso + scripts/check-qemu-install --debug --configd --match="vpp" --smoketest --uefi --cpu 4 --memory 8 --huge-page-size 2M --huge-page-count 1800 --iso $(ISO_PATH) $(filter-out $@,$(MAKECMDGOALS)) .PHONY: testc .ONESHELL: testc: checkiso - scripts/check-qemu-install --debug --configd --match="!vpp" --cpu 2 --memory 7 --configtest --iso build/live-image-amd64.hybrid.iso $(filter-out $@,$(MAKECMDGOALS)) + scripts/check-qemu-install --debug --configd --match="!vpp" --cpu 2 --memory 7 --configtest --iso $(ISO_PATH) $(filter-out $@,$(MAKECMDGOALS)) .PHONY: testcvpp .ONESHELL: testcvpp: checkiso - scripts/check-qemu-install --debug --configd --match="vpp" --cpu 4 --memory 8 --huge-page-size 2M --huge-page-count 1800 --configtest --iso build/live-image-amd64.hybrid.iso $(filter-out $@,$(MAKECMDGOALS)) + scripts/check-qemu-install --debug --configd --match="vpp" --cpu 4 --memory 8 --huge-page-size 2M --huge-page-count 1800 --configtest --iso $(ISO_PATH) $(filter-out $@,$(MAKECMDGOALS)) .PHONY: testraid .ONESHELL: testraid: checkiso - scripts/check-qemu-install --debug --configd --raid --iso build/live-image-amd64.hybrid.iso $(filter-out $@,$(MAKECMDGOALS)) + scripts/check-qemu-install --debug --configd --raid --iso $(ISO_PATH) $(filter-out $@,$(MAKECMDGOALS)) .PHONY: testsb .ONESHELL: testsb: checkiso - scripts/check-qemu-install --debug --uefi --sbtest --iso build/live-image-amd64.hybrid.iso $(filter-out $@,$(MAKECMDGOALS)) + scripts/check-qemu-install --debug --uefi --sbtest --iso $(ISO_PATH) $(filter-out $@,$(MAKECMDGOALS)) .PHONY: testtpm .ONESHELL: testtpm: checkiso - scripts/check-qemu-install --debug --tpmtest --iso build/live-image-amd64.hybrid.iso $(filter-out $@,$(MAKECMDGOALS)) + scripts/check-qemu-install --debug --tpmtest --iso $(ISO_PATH) $(filter-out $@,$(MAKECMDGOALS)) .PHONY: test-ci-qcow2 .ONESHELL: @@ -76,18 +77,18 @@ test-ci-qcow2: echo "Could not find any QCOW2 disk image" exit 1 fi - rm -f cloud-init-image-amd64.qcow2 ; cp $$(ls -t build/*.qcow2 | head -n 1) cloud-init-image-amd64.qcow2 - scripts/check-qemu-install --debug --cloud-init --disk cloud-init-image-amd64.qcow2 $(filter-out $@,$(MAKECMDGOALS)) + rm -f cloud-init-image-$(ARCH).qcow2 ; cp $$(ls -t build/*.qcow2 | head -n 1) cloud-init-image-$(ARCH).qcow2 + scripts/check-qemu-install --debug --cloud-init --disk cloud-init-image-$(ARCH).qcow2 $(filter-out $@,$(MAKECMDGOALS)) .PHONY: qemu-live .ONESHELL: qemu-live: checkiso - scripts/check-qemu-install --qemu-cmd --iso build/live-image-amd64.hybrid.iso $(filter-out $@,$(MAKECMDGOALS)) + scripts/check-qemu-install --qemu-cmd --iso $(ISO_PATH) $(filter-out $@,$(MAKECMDGOALS)) .PHONY: oci .ONESHELL: oci: checkiso - scripts/iso-to-oci build/live-image-amd64.hybrid.iso + scripts/iso-to-oci $(ISO_PATH) .PHONY: clean .ONESHELL: |
