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>
This commit is contained in:
Simon Glass 2022-04-30 00:56:47 -06:00 committed by Tom Rini
parent a36d251b50
commit b550853b7d
2 changed files with 2 additions and 2 deletions

View File

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

View File

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