From 9bf716ede076fe881e2c989e7cd47b5c46e26060 Mon Sep 17 00:00:00 2001 From: Jakub Czapiga Date: Mon, 9 Aug 2021 15:00:43 +0200 Subject: [PATCH] tests/Makefile.inc: Add copy-test macro copy-test macro copies attributes from one test to another. It can be used to create multiple tests with the same subset of attributes values. Signed-off-by: Jakub Czapiga Change-Id: I9c9b6b12830c7060ffe5dcf35c9486655cbd08e0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56932 Tested-by: build bot (Jenkins) Reviewed-by: Paul Fagerburg --- tests/Makefile.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Makefile.inc b/tests/Makefile.inc index 85d30a2651..f3a708af11 100644 --- a/tests/Makefile.inc +++ b/tests/Makefile.inc @@ -94,6 +94,12 @@ $(if $(findstring $($(1)$(2)-stage), $(stages)),, Check your $(dir $(1)$(2))Makefile.inc)) endef +# Copy attributes of one test to another. +# $1 - input test name +# $2 - output test name +copy-test = $(foreach attr,$(attributes), \ + $(eval $(strip $(2))-$(attr) := $($(strip $(1))-$(attr)))) + $(call add-special-class, tests) $(call evaluate_subdirs)