From 3c26cc981fa25bc8303dda90737f310a9d2a8a72 Mon Sep 17 00:00:00 2001 From: Tomas Hozza Date: Mon, 18 Jul 2022 14:28:09 +0200 Subject: [PATCH] tests/unit: install build requires from SPEC The unit test uses Golang to directly execute unit tests from dist-git sources. Running unit tests requires all package build dependencies to be installed. Previously, this was handled by explicitly specifying all package build dependencies as a test dependencies. This results in the requirement to update the unit test for any new release with additional build dependency. This information is already encoded in the SPEC file and it is not really specific to the unit test. Move away from specifying package build dependencies as the test dependency and install BuildRequires from the package SPEC as part of the test case. Related: rhbz#2059870 --- tests/unit.fmf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/unit.fmf b/tests/unit.fmf index bc83889..8181435 100644 --- a/tests/unit.fmf +++ b/tests/unit.fmf @@ -1,6 +1,5 @@ summary: Run unit tests require: - golang - - krb5-devel -test: cd ../osbuild-composer-*/ && GOFLAGS=-mod=vendor go test ./... +test: cd ../osbuild-composer-*/ && sudo dnf builddep -y osbuild-composer.spec && GOFLAGS=-mod=vendor go test ./... duration: 1h