test: Only descend into test/ when CONFIG_UNIT_TEST is enabled
authorTom Rini <trini@konsulko.com>
Sat, 8 Dec 2018 00:00:40 +0000 (19:00 -0500)
committerTom Rini <trini@konsulko.com>
Sat, 15 Dec 2018 16:49:19 +0000 (11:49 -0500)
The contents of the test subdirectories only make sense when we have
CONFIG_UNIT_TEST set.  We will otherwise attempt to build code on for
example sandbox that needs CONFIG_UNIT_TEST otherwise and rather than
complicate the Makefiles simply leave them out when we can.

Signed-off-by: Tom Rini <trini@konsulko.com>
Makefile

index 5683714947f24547461c4bb761942946ef894c34..f69aa06169223767f1b36c48622693bba72146de 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -724,8 +724,7 @@ libs-y += common/
 libs-y += env/
 libs-$(CONFIG_API) += api/
 libs-$(CONFIG_HAS_POST) += post/
-libs-y += test/
-libs-y += test/dm/
+libs-$(CONFIG_UNIT_TEST) += test/ test/dm/
 libs-$(CONFIG_UT_ENV) += test/env/
 libs-$(CONFIG_UT_OVERLAY) += test/overlay/