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
This commit is contained in:
parent
732b443e07
commit
3c26cc981f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user