[PATCH v8 03/13] test: Tidy up test building with SPL

Simon Glass sjg at chromium.org
Sat Apr 30 08:56:47 CEST 2022


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 <sjg at chromium.org>
---

(no changes since v1)

 Makefile             | 2 +-
 scripts/Makefile.spl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index ccc87c3a5cd..3f28333e644 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 6ad82cecfb7..30672a61179 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))
-- 
2.36.0.464.gb9c8b46e94-goog



More information about the U-Boot mailing list