From 20bd0635a6555292512b3690bc5eac0c73abf128 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Wed, 27 Nov 2019 13:25:45 +0200 Subject: [PATCH] tests: If TEST_OS isn't specified then match the host OS this will help with downstream snapshots testing making it easier to match the host OS snapshot Cherry-picked from 6839390be262f5a51f17e1b8d728f88106385f39 Related: rhbz#1769525 --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dc061c34..e7b7cc98 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,9 @@ TAG = lorax-$(VERSION)-$(RELEASE) IMAGE_RELEASE = rhel8-latest ifeq ($(TEST_OS),) -TEST_OS = rhel-8-1 +OS_ID = $(shell awk -F= '/^ID=/ {print $$2}' /etc/os-release) +OS_VERSION = $(shell awk -F= '/^VERSION_ID/ {print $$2}' /etc/os-release | tr '.' '-') +TEST_OS = $(OS_ID)-$(OS_VERSION) endif export TEST_OS VM_IMAGE=$(CURDIR)/test/images/$(TEST_OS)