blob: 310fb1ba6eaa678fb54220b38f91676af36af82f [file] [log] [blame]
Simon Glass36778df2023-09-14 10:55:44 -06001menu "Testing"
Heinrich Schuchardt005acb22023-04-03 20:27:43 +02002
3config UNIT_TEST
Joe Hershbergerfeb38472015-05-20 14:27:31 -05004 bool "Unit tests"
Simon Glass8b888912023-10-26 14:31:17 -04005 depends on CMDLINE
Joe Hershbergerfeb38472015-05-20 14:27:31 -05006 help
7 Select this to compile in unit tests for various parts of
8 U-Boot. Test suites will be subcommands of the "ut" command.
9 This does not require sandbox to be included, but it is most
10 often used there.
Joe Hershbergere721b882015-05-20 14:27:27 -050011
Simon Glassba96be42020-10-25 20:38:26 -060012config SPL_UNIT_TEST
13 bool "Unit tests in SPL"
Tom Rinib3401992022-06-10 23:03:09 -040014 depends on SPL
Simon Glassba96be42020-10-25 20:38:26 -060015 # We need to be able to unbind devices for tests to work
16 select SPL_DM_DEVICE_REMOVE
17 help
18 Select this to enable unit tests in SPL. Most test are designed for
19 running in U-Boot proper, but some are intended for SPL, such as
20 of-platdata and SPL handover. To run these tests with the sandbox_spl
21 board, use the -u (unit test) option.
22
Heinrich Schuchardt2dd01112019-01-30 07:53:31 +010023config UT_LIB
24 bool "Unit tests for library functions"
25 depends on UNIT_TEST
Simon Glass29784d62022-08-01 07:57:59 -060026 default y if !SANDBOX_VPL
Heinrich Schuchardt2dd01112019-01-30 07:53:31 +010027 help
28 Enables the 'ut lib' command which tests library functions like
AKASHI Takahirof523400f2019-11-13 09:45:02 +090029 memcat(), memcyp(), memmove() and ASN1 compiler/decoder.
30
31if UT_LIB
32
33config UT_LIB_ASN1
34 bool "Unit test for asn1 compiler and decoder function"
Simon Glassf2311512023-10-01 19:15:14 -060035 depends on SANDBOX
AKASHI Takahirof523400f2019-11-13 09:45:02 +090036 default y
37 imply ASYMMETRIC_KEY_TYPE
38 imply ASYMMETRIC_PUBLIC_KEY_SUBTYPE
39 imply X509_CERTIFICATE_PARSER
40 imply PKCS7_MESSAGE_PARSER
41 imply RSA_PUBLIC_KEY_PARSER
42 help
43 Enables a test which exercises asn1 compiler and decoder function
44 via various parsers.
45
Steffen Jaeckel26dd9932021-07-08 15:57:33 +020046config UT_LIB_CRYPT
47 bool "Unit test for crypt-style password hashing"
48 depends on !SPL && AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION
49 default y
50 select CRYPT_PW
51 select CRYPT_PW_SHA256
52 select CRYPT_PW_SHA512
53 help
54 Enables a test for the crypt-style password hash functions.
55
AKASHI Takahirod090b392020-02-21 15:13:00 +090056config UT_LIB_RSA
57 bool "Unit test for rsa_verify() function"
58 depends on RSA
59 depends on RSA_VERIFY_WITH_PKEY
60 select IMAGE_SIGN_INFO
61 default y
62 help
63 Enables rsa_verify() test, currently rsa_verify_with_pkey only()
64 only, at the 'ut lib' command.
65
AKASHI Takahirof523400f2019-11-13 09:45:02 +090066endif
Heinrich Schuchardt2dd01112019-01-30 07:53:31 +010067
Heinrich Schuchardtde429d72020-10-31 08:59:25 +010068config UT_COMPRESSION
69 bool "Unit test for compression"
70 depends on UNIT_TEST
Brandon Maier65d373a2023-01-12 10:27:46 -060071 depends on CMDLINE && GZIP_COMPRESSED && BZIP2 && LZMA && LZO && LZ4 && ZSTD
Heinrich Schuchardtde429d72020-10-31 08:59:25 +010072 default y
73 help
74 Enables tests for compression and decompression routines for simple
75 sanity and for buffer overflow conditions.
76
Heinrich Schuchardt395041b2020-02-26 21:48:18 +010077config UT_LOG
78 bool "Unit tests for logging functions"
79 depends on UNIT_TEST
80 default y
81 help
82 Enables the 'ut log' command which tests logging functions like
83 log_err().
84 See also CONFIG_LOG_TEST which provides the 'log test' command.
85
Joe Hershbergerc812f722015-05-20 14:27:30 -050086config UT_TIME
Simon Glass8271f5d2015-05-02 09:25:02 -060087 bool "Unit tests for time functions"
Joe Hershbergerfeb38472015-05-20 14:27:31 -050088 depends on UNIT_TEST
Simon Glass8271f5d2015-05-02 09:25:02 -060089 help
Joe Hershbergerc812f722015-05-20 14:27:30 -050090 Enables the 'ut time' command which tests that the time functions
Simon Glass8271f5d2015-05-02 09:25:02 -060091 work correctly. The test is fairly simple and will not catch all
92 problems. But if you are having problems with udelay() and the like,
93 this is a good place to start.
94
Heinrich Schuchardtf11a1642018-08-31 21:31:28 +020095config UT_UNICODE
96 bool "Unit tests for Unicode functions"
97 depends on UNIT_TEST
98 default y
Heinrich Schuchardtd30924f2022-05-02 06:27:00 +020099 select CHARSET
Heinrich Schuchardtf11a1642018-08-31 21:31:28 +0200100 help
101 Enables the 'ut unicode' command which tests that the functions for
102 manipulating Unicode strings work correctly.
103
Simon Glass19679822015-02-05 21:41:37 -0700104source "test/dm/Kconfig"
Joe Hershberger421f86f2015-05-20 14:27:36 -0500105source "test/env/Kconfig"
Sean Andersonc56468a62023-10-14 16:47:57 -0400106source "test/image/Kconfig"
Simon Glass29784d62022-08-01 07:57:59 -0600107source "test/lib/Kconfig"
Heiko Stuebner96383bd2019-10-23 16:46:41 +0200108source "test/optee/Kconfig"
Maxime Ripardf2a99422016-07-05 10:26:46 +0200109source "test/overlay/Kconfig"
Heinrich Schuchardt005acb22023-04-03 20:27:43 +0200110
Simon Glass36778df2023-09-14 10:55:44 -0600111config POST
112 bool "Power On Self Test support"
113 help
114 See doc/README.POST for more details
115
Heinrich Schuchardt005acb22023-04-03 20:27:43 +0200116endmenu