test: Make all tests depend on UNIT_TEST
authorSimon Glass <sjg@chromium.org>
Fri, 7 Feb 2025 18:30:43 +0000 (11:30 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 12 Feb 2025 02:10:59 +0000 (20:10 -0600)
Rather than having this condition defined separately for each suite,
bracket all options with 'if UNIT_TEST'.

Signed-off-by: Simon Glass <sjg@chromium.org>
test/Kconfig
test/dm/Kconfig
test/env/Kconfig
test/fdt_overlay/Kconfig
test/optee/Kconfig

index 01d6464..31016ee 100644 (file)
@@ -20,9 +20,10 @@ config SPL_UNIT_TEST
          of-platdata and SPL handover. To run these tests with the sandbox_spl
          board, use the -u (unit test) option.
 
+if UNIT_TEST
+
 config UNIT_TEST_DURATION
        bool "Report unit-test duration"
-       depends on UNIT_TEST
        default y
        help
          Enable this short the time taken by each test suite. This is reported
@@ -31,7 +32,6 @@ config UNIT_TEST_DURATION
 
 config UT_LIB
        bool "Unit tests for library functions"
-       depends on UNIT_TEST
        default y if !SANDBOX_VPL
        help
          Enables the 'ut lib' command which tests library functions like
@@ -72,16 +72,15 @@ config UT_LIB_RSA
          Enables rsa_verify() test, currently rsa_verify_with_pkey only()
          only, at the 'ut lib' command.
 
-endif
+endif  # UT_LIB
 
 config UT_BOOTSTD
        bool "Unit tests for standard boot"
-       depends on UNIT_TEST && BOOTSTD && SANDBOX
+       depends on BOOTSTD && SANDBOX
        default y
 
 config UT_COMPRESSION
        bool "Unit test for compression"
-       depends on UNIT_TEST
        depends on CMDLINE && GZIP_COMPRESSED && BZIP2 && LZMA && LZO && LZ4 && ZSTD
        default y
        help
@@ -90,7 +89,6 @@ config UT_COMPRESSION
 
 config UT_LOG
        bool "Unit tests for logging functions"
-       depends on UNIT_TEST
        default y
        help
          Enables the 'ut log' command which tests logging functions like
@@ -99,7 +97,6 @@ config UT_LOG
 
 config UT_TIME
        bool "Unit tests for time functions"
-       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
@@ -108,7 +105,6 @@ config UT_TIME
 
 config UT_UNICODE
        bool "Unit tests for Unicode functions"
-       depends on UNIT_TEST
        default y
        select CHARSET
        help
@@ -122,6 +118,8 @@ source "test/lib/Kconfig"
 source "test/optee/Kconfig"
 source "test/fdt_overlay/Kconfig"
 
+endif  # UNIT_TEST
+
 config POST
        bool "Power On Self Test support"
        help
index e5b341e..640421c 100644 (file)
@@ -1,6 +1,6 @@
 config UT_DM
        bool "Enable driver model unit test command"
-       depends on SANDBOX && UNIT_TEST
+       depends on SANDBOX
        help
          This enables the 'ut dm' command which runs a series of unit
          tests on the driver model code. Each subsystem (uclass) is tested.
index 6cb8233..21d88f4 100644 (file)
@@ -1,6 +1,5 @@
 config UT_ENV
        bool "Enable env unit tests"
-       depends on UNIT_TEST
        default y
        help
          This enables the 'ut env' command which runs a series of unit
index c2bb70f..c50b882 100644 (file)
@@ -1,6 +1,6 @@
 config UT_FDT_OVERLAY
        bool "Enable Device Tree Overlays Unit Tests"
-       depends on UNIT_TEST && OF_CONTROL && SANDBOX
+       depends on OF_CONTROL && SANDBOX
        default y
        select OF_LIBFDT_OVERLAY
        help
index 2f6834a..63e2cbf 100644 (file)
@@ -1,6 +1,6 @@
 config UT_OPTEE
        bool "Enable OP-TEE Unit Tests"
-       depends on UNIT_TEST && OF_CONTROL && OPTEE
+       depends on OF_CONTROL && OPTEE
        default y
        help
          This enables the 'ut optee' command which runs a series of unit