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 <sjg@chromium.org>
diff --git a/Makefile b/Makefile
index ccc87c3..3f28333 100644
--- a/Makefile
+++ b/Makefile
@@ -846,7 +846,7 @@
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/