blob: a6b463e4d06cf8f784e5e850cdb85362f7b9ee39 [file] [log] [blame]
Joe Hershberger437176b2015-05-20 14:27:31 -05001menuconfig UNIT_TEST
2 bool "Unit tests"
3 help
4 Select this to compile in unit tests for various parts of
5 U-Boot. Test suites will be subcommands of the "ut" command.
6 This does not require sandbox to be included, but it is most
7 often used there.
Joe Hershberger3a77be52015-05-20 14:27:27 -05008
Simon Glassbf40eee2020-10-25 20:38:26 -06009config SPL_UNIT_TEST
10 bool "Unit tests in SPL"
Tom Rini0a83cc22022-06-10 23:03:09 -040011 depends on SPL
Simon Glassbf40eee2020-10-25 20:38:26 -060012 # We need to be able to unbind devices for tests to work
13 select SPL_DM_DEVICE_REMOVE
14 help
15 Select this to enable unit tests in SPL. Most test are designed for
16 running in U-Boot proper, but some are intended for SPL, such as
17 of-platdata and SPL handover. To run these tests with the sandbox_spl
18 board, use the -u (unit test) option.
19
Heinrich Schuchardtf77a6352019-01-30 07:53:31 +010020config UT_LIB
21 bool "Unit tests for library functions"
22 depends on UNIT_TEST
Simon Glass644d8072022-08-01 07:57:59 -060023 default y if !SANDBOX_VPL
Heinrich Schuchardtf77a6352019-01-30 07:53:31 +010024 help
25 Enables the 'ut lib' command which tests library functions like
AKASHI Takahirob5124e32019-11-13 09:45:02 +090026 memcat(), memcyp(), memmove() and ASN1 compiler/decoder.
27
28if UT_LIB
29
30config UT_LIB_ASN1
31 bool "Unit test for asn1 compiler and decoder function"
32 default y
33 imply ASYMMETRIC_KEY_TYPE
34 imply ASYMMETRIC_PUBLIC_KEY_SUBTYPE
35 imply X509_CERTIFICATE_PARSER
36 imply PKCS7_MESSAGE_PARSER
37 imply RSA_PUBLIC_KEY_PARSER
38 help
39 Enables a test which exercises asn1 compiler and decoder function
40 via various parsers.
41
Steffen Jaeckel229bd512021-07-08 15:57:33 +020042config UT_LIB_CRYPT
43 bool "Unit test for crypt-style password hashing"
44 depends on !SPL && AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION
45 default y
46 select CRYPT_PW
47 select CRYPT_PW_SHA256
48 select CRYPT_PW_SHA512
49 help
50 Enables a test for the crypt-style password hash functions.
51
AKASHI Takahirof24cd6c2020-02-21 15:13:00 +090052config UT_LIB_RSA
53 bool "Unit test for rsa_verify() function"
54 depends on RSA
55 depends on RSA_VERIFY_WITH_PKEY
56 select IMAGE_SIGN_INFO
57 default y
58 help
59 Enables rsa_verify() test, currently rsa_verify_with_pkey only()
60 only, at the 'ut lib' command.
61
AKASHI Takahirob5124e32019-11-13 09:45:02 +090062endif
Heinrich Schuchardtf77a6352019-01-30 07:53:31 +010063
Heinrich Schuchardt7b3b0032020-10-31 08:59:25 +010064config UT_COMPRESSION
65 bool "Unit test for compression"
66 depends on UNIT_TEST
67 depends on CMDLINE && GZIP_COMPRESSED && BZIP2 && LZMA && LZO && LZ4
68 default y
69 help
70 Enables tests for compression and decompression routines for simple
71 sanity and for buffer overflow conditions.
72
Heinrich Schuchardtf433d502020-02-26 21:48:18 +010073config UT_LOG
74 bool "Unit tests for logging functions"
75 depends on UNIT_TEST
76 default y
77 help
78 Enables the 'ut log' command which tests logging functions like
79 log_err().
80 See also CONFIG_LOG_TEST which provides the 'log test' command.
81
Joe Hershbergeree20efe2015-05-20 14:27:30 -050082config UT_TIME
Simon Glass9b4221b2015-05-02 09:25:02 -060083 bool "Unit tests for time functions"
Joe Hershberger437176b2015-05-20 14:27:31 -050084 depends on UNIT_TEST
Simon Glass9b4221b2015-05-02 09:25:02 -060085 help
Joe Hershbergeree20efe2015-05-20 14:27:30 -050086 Enables the 'ut time' command which tests that the time functions
Simon Glass9b4221b2015-05-02 09:25:02 -060087 work correctly. The test is fairly simple and will not catch all
88 problems. But if you are having problems with udelay() and the like,
89 this is a good place to start.
90
Heinrich Schuchardtb8b6c812018-08-31 21:31:28 +020091config UT_UNICODE
92 bool "Unit tests for Unicode functions"
93 depends on UNIT_TEST
94 default y
Heinrich Schuchardt013aabb2022-05-02 06:27:00 +020095 select CHARSET
Heinrich Schuchardtb8b6c812018-08-31 21:31:28 +020096 help
97 Enables the 'ut unicode' command which tests that the functions for
98 manipulating Unicode strings work correctly.
99
Simon Glass9dd430d2015-02-05 21:41:37 -0700100source "test/dm/Kconfig"
Joe Hershberger26e038f2015-05-20 14:27:36 -0500101source "test/env/Kconfig"
Simon Glass644d8072022-08-01 07:57:59 -0600102source "test/lib/Kconfig"
Heiko Stuebner1c9bb9b2019-10-23 16:46:41 +0200103source "test/optee/Kconfig"
Maxime Ripard0e31a112016-07-05 10:26:46 +0200104source "test/overlay/Kconfig"