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 6839390be2

Related: rhbz#1769525
This commit is contained in:
Alexander Todorov 2019-11-27 13:25:45 +02:00 committed by Alexander Todorov
parent 86ea9adbab
commit 20bd0635a6

View File

@ -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)