Browse Source

test: Move the unit tests to their own menu

Make all unit tests selectable as a menu of test suites instead of just
sitting in the top-level menu individually.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Joe Hershberger 9 years ago
parent
commit
feb3847250
3 changed files with 10 additions and 5 deletions
  1. 1 0
      configs/sandbox_defconfig
  2. 8 3
      test/Kconfig
  3. 1 2
      test/dm/Kconfig

+ 1 - 0
configs/sandbox_defconfig

@@ -37,5 +37,6 @@ CONFIG_USB_EMUL=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_RTC=y
 CONFIG_DM_RTC=y
 CONFIG_ERRNO_STR=y
 CONFIG_ERRNO_STR=y
+CONFIG_UNIT_TEST=y
 CONFIG_UT_TIME=y
 CONFIG_UT_TIME=y
 CONFIG_UT_DM=y
 CONFIG_UT_DM=y

+ 8 - 3
test/Kconfig

@@ -1,9 +1,14 @@
-config UNIT_TEST
-	bool
+menuconfig UNIT_TEST
+	bool "Unit tests"
+	help
+	  Select this to compile in unit tests for various parts of
+	  U-Boot. Test suites will be subcommands of the "ut" command.
+	  This does not require sandbox to be included, but it is most
+	  often used there.
 
 
 config UT_TIME
 config UT_TIME
 	bool "Unit tests for time functions"
 	bool "Unit tests for time functions"
-	select UNIT_TEST
+	depends on UNIT_TEST
 	help
 	help
 	  Enables the 'ut time' command which tests that the time functions
 	  Enables the 'ut time' command which tests that the time functions
 	  work correctly. The test is fairly simple and will not catch all
 	  work correctly. The test is fairly simple and will not catch all

+ 1 - 2
test/dm/Kconfig

@@ -1,7 +1,6 @@
 config UT_DM
 config UT_DM
 	bool "Enable driver model unit test command"
 	bool "Enable driver model unit test command"
-	depends on SANDBOX
-	select UNIT_TEST
+	depends on SANDBOX && UNIT_TEST
 	help
 	help
 	  This enables the 'ut dm' command which runs a series of unit
 	  This enables the 'ut dm' command which runs a series of unit
 	  tests on the driver model code. Each subsystem (uclass) is tested.
 	  tests on the driver model code. Each subsystem (uclass) is tested.