dm: test: Make use of CONFIG_UNIT_TEST
authorSimon Glass <sjg@chromium.org>
Sat, 3 Oct 2020 15:25:25 +0000 (09:25 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 29 Oct 2020 20:42:17 +0000 (14:42 -0600)
At present we always include test/dm from the main Makefile. We have a
CONFIG_UNIT_TEST that should control whether the test/ directory is built,
so rely on that instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
Makefile
test/Makefile

index 5b80eb2..89c42c1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -807,7 +807,7 @@ libs-$(CONFIG_API) += api/
 ifdef CONFIG_POST
 libs-y += post/
 endif
-libs-$(CONFIG_UNIT_TEST) += test/ test/dm/
+libs-$(CONFIG_UNIT_TEST) += test/
 libs-$(CONFIG_UT_ENV) += test/env/
 libs-$(CONFIG_UT_OPTEE) += test/optee/
 libs-$(CONFIG_UT_OVERLAY) += test/overlay/
index 73bddb4..ed3e882 100644 (file)
@@ -9,8 +9,9 @@ obj-$(CONFIG_$(SPL_)CMDLINE) += command_ut.o
 obj-$(CONFIG_$(SPL_)CMDLINE) += compression.o
 obj-$(CONFIG_UNIT_TEST) += lib/
 obj-y += log/
+obj-y += dm/
 obj-$(CONFIG_$(SPL_)CMDLINE) += print_ut.o
 obj-$(CONFIG_$(SPL_)CMDLINE) += str_ut.o
 obj-$(CONFIG_UT_TIME) += time_ut.o
 obj-$(CONFIG_UT_UNICODE) += unicode_ut.o
-obj-$(CONFIG_UNIT_TEST) += ut.o
+obj-y += ut.o