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 <jacz@semihalf.com>
Change-Id: I9c9b6b12830c7060ffe5dcf35c9486655cbd08e0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56932
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
This commit is contained in:
Jakub Czapiga 2021-08-09 15:00:43 +02:00 committed by Nick Vaccaro
parent eaf5ff3607
commit 9bf716ede0
1 changed files with 6 additions and 0 deletions

View File

@ -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)