diff mbox

[U-Boot,v5,18/26] test: Move the unit tests to their own menu

Message ID 1432150059-24238-19-git-send-email-joe.hershberger@ni.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Joe Hershberger May 20, 2015, 7:27 p.m. UTC
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>
---

Changes in v5:
-Time unit tests now depend on UNIT_TEST

Changes in v4:
-Fixed bisectability issue

Changes in v3:
-New for version 3

Changes in v2: None

 configs/sandbox_defconfig |  1 +
 test/Kconfig              | 11 ++++++++---
 test/dm/Kconfig           |  3 +--
 3 files changed, 10 insertions(+), 5 deletions(-)

Comments

Tom Rini May 23, 2015, 12:41 p.m. UTC | #1
On Wed, May 20, 2015 at 02:27:31PM -0500, Joe Hershberger wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 7b5ef2b..2598017 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -37,5 +37,6 @@  CONFIG_USB_EMUL=y
 CONFIG_USB_STORAGE=y
 CONFIG_DM_RTC=y
 CONFIG_ERRNO_STR=y
+CONFIG_UNIT_TEST=y
 CONFIG_UT_TIME=y
 CONFIG_UT_DM=y
diff --git a/test/Kconfig b/test/Kconfig
index 32a974e..50d3a49 100644
--- a/test/Kconfig
+++ b/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
 	bool "Unit tests for time functions"
-	select UNIT_TEST
+	depends on UNIT_TEST
 	help
 	  Enables the 'ut time' command which tests that the time functions
 	  work correctly. The test is fairly simple and will not catch all
diff --git a/test/dm/Kconfig b/test/dm/Kconfig
index 0fa3074..e5b341e 100644
--- a/test/dm/Kconfig
+++ b/test/dm/Kconfig
@@ -1,7 +1,6 @@ 
 config UT_DM
 	bool "Enable driver model unit test command"
-	depends on SANDBOX
-	select UNIT_TEST
+	depends on SANDBOX && UNIT_TEST
 	help
 	  This enables the 'ut dm' command which runs a series of unit
 	  tests on the driver model code. Each subsystem (uclass) is tested.