diff --git a/test/env b/test/env index f10a1ca6..bfcb79e1 100755 --- a/test/env +++ b/test/env @@ -96,14 +96,18 @@ start_topology() done base_img=$(get_base_img "$files") - $testdir/inject-test-mode -b "$base_img" -o "${base_img%-disk.img}-disk-test.img" + test_img="${base_img%-disk.img}-disk-test.img" + + $testdir/inject-test-mode -b "$base_img" -o "$test_img" + + img_name=$(basename "$test_img") + sed -i "s/qn_image=\".*\"/qn_image=\"$img_name\"/" "$envdir/qeneth/topology.dot.in" (cd "$envdir/qeneth/" && $qeneth generate && $qeneth start) INFAMY_ARGS="$INFAMY_ARGS $envdir/qeneth/topology.dot" cat <"$envdir/bin/qeneth" #!/bin/sh -set -x cd $envdir/qeneth && exec $testdir/qeneth/qeneth "\$@" EOF chmod +x "$envdir/bin/qeneth" diff --git a/test/test.mk b/test/test.mk index 4631c46e..9e0bb23c 100644 --- a/test/test.mk +++ b/test/test.mk @@ -13,9 +13,7 @@ GIT_PATH = $(BR2_EXTERNAL_INFIX_PATH) endif GIT_VERSION = $(shell git -C $(GIT_PATH) describe --dirty --always --tags) -IMAGE ?= infix -TOPOLOGY-DIR ?= $(test-dir)/virt/quad - +TOPOLOGY-DIR := $(test-dir)/virt/quad base := -b $(base-dir) TEST_MODE ?= qeneth @@ -24,7 +22,8 @@ mode-host := -t $(or $(TOPOLOGY),/etc/infamy.dot) mode-run := -t $(BINARIES_DIR)/qemu.dot mode := $(mode-$(TEST_MODE)) -binaries-$(ARCH) := $(addprefix $(IMAGE)-$(ARCH),.img -disk.img .pkg) +INFIX_IMAGE_ID := $(subst ",,$(INFIX_IMAGE_ID)) +binaries-$(ARCH) := $(addprefix $(INFIX_IMAGE_ID),.img -disk.img .pkg) binaries-x86_64 += OVMF.fd binaries := $(foreach bin,$(binaries-$(ARCH)),-f $(BINARIES_DIR)/$(bin))