blob: 7f3447ae5acd1271ffee6881fbd15d3e4ab9b05c [file] [log] [blame]
Joe Hershbergerfeb38472015-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 Hershbergere721b882015-05-20 14:27:27 -05008
Simon Glassba96be42020-10-25 20:38:26 -06009config SPL_UNIT_TEST
10 bool "Unit tests in SPL"
11 # We need to be able to unbind devices for tests to work
12 select SPL_DM_DEVICE_REMOVE
13 help
14 Select this to enable unit tests in SPL. Most test are designed for
15 running in U-Boot proper, but some are intended for SPL, such as
16 of-platdata and SPL handover. To run these tests with the sandbox_spl
17 board, use the -u (unit test) option.
18
Heinrich Schuchardt2dd01112019-01-30 07:53:31 +010019config UT_LIB
20 bool "Unit tests for library functions"
21 depends on UNIT_TEST
22 default y
23 help
24 Enables the 'ut lib' command which tests library functions like
AKASHI Takahirof523400f2019-11-13 09:45:02 +090025 memcat(), memcyp(), memmove() and ASN1 compiler/decoder.
26
27if UT_LIB
28
29config UT_LIB_ASN1
30 bool "Unit test for asn1 compiler and decoder function"
31 default y
32 imply ASYMMETRIC_KEY_TYPE
33 imply ASYMMETRIC_PUBLIC_KEY_SUBTYPE
34 imply X509_CERTIFICATE_PARSER
35 imply PKCS7_MESSAGE_PARSER
36 imply RSA_PUBLIC_KEY_PARSER
37 help
38 Enables a test which exercises asn1 compiler and decoder function
39 via various parsers.
40
Steffen Jaeckel26dd9932021-07-08 15:57:33 +020041config UT_LIB_CRYPT
42 bool "Unit test for crypt-style password hashing"
43 depends on !SPL && AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION
44 default y
45 select CRYPT_PW
46 select CRYPT_PW_SHA256
47 select CRYPT_PW_SHA512
48 help
49 Enables a test for the crypt-style password hash functions.
50
AKASHI Takahirod090b392020-02-21 15:13:00 +090051config UT_LIB_RSA
52 bool "Unit test for rsa_verify() function"
53 depends on RSA
54 depends on RSA_VERIFY_WITH_PKEY
55 select IMAGE_SIGN_INFO
56 default y
57 help
58 Enables rsa_verify() test, currently rsa_verify_with_pkey only()
59 only, at the 'ut lib' command.
60
AKASHI Takahirof523400f2019-11-13 09:45:02 +090061endif
Heinrich Schuchardt2dd01112019-01-30 07:53:31 +010062
Heinrich Schuchardtde429d72020-10-31 08:59:25 +010063config UT_COMPRESSION
64 bool "Unit test for compression"
65 depends on UNIT_TEST
66 depends on CMDLINE && GZIP_COMPRESSED && BZIP2 && LZMA && LZO && LZ4
67 default y
68 help
69 Enables tests for compression and decompression routines for simple
70 sanity and for buffer overflow conditions.
71
Heinrich Schuchardt395041b2020-02-26 21:48:18 +010072config UT_LOG
73 bool "Unit tests for logging functions"
74 depends on UNIT_TEST
75 default y
76 help
77 Enables the 'ut log' command which tests logging functions like
78 log_err().
79 See also CONFIG_LOG_TEST which provides the 'log test' command.
80
Joe Hershbergerc812f722015-05-20 14:27:30 -050081config UT_TIME
Simon Glass8271f5d2015-05-02 09:25:02 -060082 bool "Unit tests for time functions"
Joe Hershbergerfeb38472015-05-20 14:27:31 -050083 depends on UNIT_TEST
Simon Glass8271f5d2015-05-02 09:25:02 -060084 help
Joe Hershbergerc812f722015-05-20 14:27:30 -050085 Enables the 'ut time' command which tests that the time functions
Simon Glass8271f5d2015-05-02 09:25:02 -060086 work correctly. The test is fairly simple and will not catch all
87 problems. But if you are having problems with udelay() and the like,
88 this is a good place to start.
89
Heinrich Schuchardtf11a1642018-08-31 21:31:28 +020090config UT_UNICODE
91 bool "Unit tests for Unicode functions"
92 depends on UNIT_TEST
93 default y
Heinrich Schuchardtd30924f2022-05-02 06:27:00 +020094 select CHARSET
Heinrich Schuchardtf11a1642018-08-31 21:31:28 +020095 help
96 Enables the 'ut unicode' command which tests that the functions for
97 manipulating Unicode strings work correctly.
98
Simon Glass19679822015-02-05 21:41:37 -070099source "test/dm/Kconfig"
Joe Hershberger421f86f2015-05-20 14:27:36 -0500100source "test/env/Kconfig"
Heiko Stuebner96383bd2019-10-23 16:46:41 +0200101source "test/optee/Kconfig"
Maxime Ripardf2a99422016-07-05 10:26:46 +0200102source "test/overlay/Kconfig"