test: Make all tests depend on UNIT_TEST

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>
This commit is contained in:
Simon Glass 2025-02-07 11:30:43 -07:00 committed by Tom Rini
parent d87ffdaa3c
commit 9aaa4a3565
5 changed files with 9 additions and 12 deletions

View 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

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

1
test/env/Kconfig vendored
View 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

View 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

View 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