test: Run bootstd tests only on sandbox
authorSimon Glass <sjg@chromium.org>
Mon, 2 Oct 2023 01:15:15 +0000 (19:15 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 13 Dec 2023 23:39:05 +0000 (18:39 -0500)
These make use of disk images which are not available on reak boards.
Add a new Kconfig to ensure these tests only run where they are valid.

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

index 310fb1b..e842c01 100644 (file)
@@ -65,6 +65,11 @@ config UT_LIB_RSA
 
 endif
 
+config UT_BOOTSTD
+       bool "Unit tests for standard boot"
+       depends on UNIT_TEST && SANDBOX
+       default y
+
 config UT_COMPRESSION
        bool "Unit test for compression"
        depends on UNIT_TEST
index 8e1fed2..6b8a150 100644 (file)
@@ -23,7 +23,7 @@ obj-$(CONFIG_UT_TIME) += time_ut.o
 obj-y += ut.o
 
 ifeq ($(CONFIG_SPL_BUILD),)
-obj-$(CONFIG_UNIT_TEST) += boot/
+obj-$(CONFIG_$(SPL_)UT_BOOTSTD) += boot/
 obj-$(CONFIG_UNIT_TEST) += common/
 obj-y += log/
 obj-$(CONFIG_$(SPL_)UT_UNICODE) += unicode_ut.o
index 60cd049..1b934b2 100644 (file)
@@ -57,7 +57,7 @@ static struct cmd_tbl cmd_ut_sub[] = {
 #ifdef CONFIG_CMD_BDI
        U_BOOT_CMD_MKENT(bdinfo, CONFIG_SYS_MAXARGS, 1, do_ut_bdinfo, "", ""),
 #endif
-#ifdef CONFIG_BOOTSTD
+#ifdef CONFIG_UT_BOOTSTD
        U_BOOT_CMD_MKENT(bootstd, CONFIG_SYS_MAXARGS, 1, do_ut_bootstd,
                         "", ""),
 #endif