From a0e36d8cbaad6ead0102721fdedb3b4c50f0273c Mon Sep 17 00:00:00 2001 From: Jakub Czapiga <jacz@semihalf.com> Date: Tue, 6 Sep 2022 10:42:16 +0200 Subject: tests: Add support for tests build failures detection This patch introduces new target: junit.xml-unit-tests, which builds and runs unit-tests. It also creates build log containing build logs. This feature allows for one to see build failures in Jenkins dashboard. Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Change-Id: I94184379dcc2ac10f1a47f4a9d205cacbeb640fe Reviewed-on: https://review.coreboot.org/c/coreboot/+/67372 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> --- util/testing/Makefile.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'util') diff --git a/util/testing/Makefile.inc b/util/testing/Makefile.inc index df6a25ef94..d9bc83fe48 100644 --- a/util/testing/Makefile.inc +++ b/util/testing/Makefile.inc @@ -104,9 +104,10 @@ endif $(MAKE) xcompile=$(COREBOOT_BUILD_DIR)/xcompile $(COREBOOT_BUILD_DIR)/xcompile $(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=src/soc/nvidia/tegra124/lp0 BLD=tegra124_lp0 MFLAGS= MAKEFLAGS=xcompile=$(COREBOOT_BUILD_DIR)/xcompile MAKETARGET=all junit.xml $(MAKE) CPUS=$(CPUS) V=$(V) Q=$(Q) BLD_DIR=src/soc/nvidia/tegra210/lp0 BLD=tegra120_lp0 MFLAGS= MAKEFLAGS=xcompile=$(COREBOOT_BUILD_DIR)/xcompile MAKETARGET=all junit.xml - $(MAKE) unit-tests JUNIT_OUTPUT=y COV=1 - (cd payloads/libpayload; unset COREBOOT_BUILD_DIR; $(MAKE) unit-tests coverage-report JUNIT_OUTPUT=y COV=1) - $(MAKE) coverage-report JUNIT_OUTPUT=y COV=1 + +$(MAKE) junit.xml-unit-tests COV=1 + +(cd payloads/libpayload; unset COREBOOT_BUILD_DIR; $(MAKE) junit.xml-unit-tests COV=1) + +(cd payloads/libpayload; unset COREBOOT_BUILD_DIR; $(MAKE) coverage-report COV=1) + +$(MAKE) coverage-report JUNIT_OUTPUT=y COV=1 find . -name 'tests.info' -exec cat {} + >$(COREBOOT_BUILD_DIR)/coverage.info test-basic: test-lint test-tools test-abuild test-payloads test-cleanup -- cgit v1.2.3