From: Simon Glass Date: Sat, 30 Apr 2022 06:56:47 +0000 (-0600) Subject: test: Tidy up test building with SPL X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=b550853b7daae54e13c473a0aabe08a0fa485d7a;p=u-boot.git test: Tidy up test building with SPL We can in principle add tests to any SPL build, e.g. TPL or VPL. Update the build rules to handle this. Signed-off-by: Simon Glass --- diff --git a/Makefile b/Makefile index ccc87c3a5c..3f28333e64 100644 --- a/Makefile +++ b/Makefile @@ -846,7 +846,7 @@ libs-y += drivers/usb/ulpi/ ifdef CONFIG_POST libs-y += post/ endif -libs-$(CONFIG_UNIT_TEST) += test/ +libs-$(CONFIG_$(SPL_TPL_)UNIT_TEST) += test/ libs-$(CONFIG_UT_ENV) += test/env/ libs-$(CONFIG_UT_OPTEE) += test/optee/ libs-$(CONFIG_UT_OVERLAY) += test/overlay/ diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 6ad82cecfb..30672a6117 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -109,7 +109,7 @@ libs-y += dts/ libs-y += fs/ libs-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/ libs-$(CONFIG_SPL_NET) += net/ -libs-$(CONFIG_SPL_UNIT_TEST) += test/ +libs-$(CONFIG_$(SPL_TPL_)UNIT_TEST) += test/ head-y := $(addprefix $(obj)/,$(head-y)) libs-y := $(addprefix $(obj)/,$(libs-y))