From bc0dd4c92cf91eacac0bff5302898013a3c55951 Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Wed, 27 Nov 2019 14:01:04 +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#1770193 --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2765605e..be42b7d8 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,9 @@ TAG = lorax-$(VERSION)-$(RELEASE) IMAGE_RELEASE = $(shell awk -F: '/FROM/ { print $$2}' Dockerfile.test) ifeq ($(TEST_OS),) -TEST_OS = rhel-7-7 +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)