Makefile: add unit-tests target

Add Makefile target to run all unit tests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2023-10-20 10:54:20 +02:00 committed by Simon de Vlieger
parent b41705adfb
commit 3df67e9adb

View file

@ -74,6 +74,7 @@ help:
@echo @echo
@echo " help: Print this usage information." @echo " help: Print this usage information."
@echo " man: Generate all man-pages" @echo " man: Generate all man-pages"
@echo " unit-tests: Run unit tests"
$(BUILDDIR)/: $(BUILDDIR)/:
mkdir -p "$@" mkdir -p "$@"
@ -195,6 +196,10 @@ worker-key-pair: ca
# delete the request # delete the request
rm /etc/osbuild-composer/worker-csr.pem rm /etc/osbuild-composer/worker-csr.pem
.PHONY: unit-tests
unit-tests:
go test -race ./...
go test -race ./internal/dnfjson/... -force-dnf
# #
# Building packages # Building packages