diff mbox series

[08/17] dm: test: Make use of CONFIG_UNIT_TEST

Message ID 20201003152534.3184504-9-sjg@chromium.org
State Accepted
Commit 16a5068340f8d28e26436acf64e4dc5f652aa2a6
Delegated to: Simon Glass
Headers show
Series dm: test: Add unit tests for SPL | expand

Commit Message

Simon Glass Oct. 3, 2020, 3:25 p.m. UTC
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      | 2 +-
 test/Makefile | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Simon Glass Oct. 27, 2020, 1:01 a.m. UTC | #1
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      | 2 +-
 test/Makefile | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 2de0527e2dd..dbe7e7b75c9 100644
--- a/Makefile
+++ b/Makefile
@@ -806,7 +806,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/
diff --git a/test/Makefile b/test/Makefile
index 73bddb4f61f..ed3e882f7a7 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -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