summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index e5546332..9b7bb695 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,8 @@ TESTENV_LOOP ?= /dev/loop7
USTREAMER_MIN_VERSION ?= $(shell grep -o 'ustreamer>=[^"]\+' PKGBUILD | sed 's/ustreamer>=//g')
+DEFAULT_PLATFORM ?= v1-vga
+
# =====
define optbool
@@ -54,8 +56,8 @@ tox: testenv
-it $(TESTENV_IMAGE) bash -c " \
cp /usr/share/kvmd/configs.default/kvmd/*.yaml /etc/kvmd \
&& cp /usr/share/kvmd/configs.default/kvmd/*passwd /etc/kvmd \
- && cp /usr/share/kvmd/configs.default/kvmd/main/v1-vga.yaml /etc/kvmd/main.yaml \
- && cp /src/testenv/v1-vga.override.yaml /etc/kvmd/override.yaml \
+ && cp /usr/share/kvmd/configs.default/kvmd/main/$(if $(P),$(P),v1-vga).yaml /etc/kvmd/main.yaml \
+ && cp /src/testenv/$(if $(P),$(P),v1-vga).override.yaml /etc/kvmd/override.yaml \
&& cd /src \
&& tox -q -c testenv/tox.ini $(if $(E),-e $(E),-p auto) \
"
@@ -78,8 +80,8 @@ run: testenv
&& cp -r /usr/share/kvmd/configs.default/nginx/* /etc/kvmd/nginx \
&& cp /usr/share/kvmd/configs.default/kvmd/*.yaml /etc/kvmd \
&& cp /usr/share/kvmd/configs.default/kvmd/*passwd /etc/kvmd \
- && cp /usr/share/kvmd/configs.default/kvmd/main/v1-vga.yaml /etc/kvmd/main.yaml \
- && cp /testenv/v1-vga.override.yaml /etc/kvmd/override.yaml \
+ && cp /usr/share/kvmd/configs.default/kvmd/main/$(if $(P),$(P),$(DEFAULT_PLATFORM)).yaml /etc/kvmd/main.yaml \
+ && cp /testenv/$(if $(P),$(P),$(DEFAULT_PLATFORM)).override.yaml /etc/kvmd/override.yaml \
&& nginx -c /etc/kvmd/nginx/nginx.conf -g 'user http; error_log stderr;' \
&& ln -s $(TESTENV_VIDEO) /dev/kvmd-video \
&& (losetup -d /dev/kvmd-msd || true) \
@@ -100,8 +102,8 @@ run-ipmi: testenv
-it $(TESTENV_IMAGE) /bin/bash -c " \
cp /usr/share/kvmd/configs.default/kvmd/*.yaml /etc/kvmd \
&& cp /usr/share/kvmd/configs.default/kvmd/*passwd /etc/kvmd \
- && cp /usr/share/kvmd/configs.default/kvmd/main/v1-vga.yaml /etc/kvmd/main.yaml \
- && cp /testenv/v1-vga.override.yaml /etc/kvmd/override.yaml \
+ && cp /usr/share/kvmd/configs.default/kvmd/main/$(if $(P),$(P),$(DEFAULT_PLATFORM)).yaml /etc/kvmd/main.yaml \
+ && cp /testenv/$(if $(P),$(P),$(DEFAULT_PLATFORM)).override.yaml /etc/kvmd/override.yaml \
&& $(if $(CMD),$(CMD),python -m kvmd.apps.ipmi) \
"