blob: ca648d23376f9cf50fd2b605f92b450847b77a1e [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"
5 help
6 Select this to compile in unit tests for various parts of
7 U-Boot. Test suites will be subcommands of the "ut" command.
8 This does not require sandbox to be included, but it is most
9 often used there.
Joe Hershbergere721b882015-05-20 14:27:27 -050010
Simon Glassba96be42020-10-25 20:38:26 -060011config SPL_UNIT_TEST
12 bool "Unit tests in SPL"
Tom Rinib3401992022-06-10 23:03:09 -040013 depends on SPL
Simon Glassba96be42020-10-25 20:38:26 -060014 # We need to be able to unbind devices for tests to work
15 select SPL_DM_DEVICE_REMOVE
16 help
17 Select this to enable unit tests in SPL. Most test are designed for
18 running in U-Boot proper, but some are intended for SPL, such as
19 of-platdata and SPL handover. To run these tests with the sandbox_spl
20 board, use the -u (unit test) option.
21
Heinrich Schuchardt2dd01112019-01-30 07:53:31 +010022config UT_LIB
23 bool "Unit tests for library functions"
24 depends on UNIT_TEST
Simon Glass29784d62022-08-01 07:57:59 -060025 default y if !SANDBOX_VPL
Heinrich Schuchardt2dd01112019-01-30 07:53:31 +010026 help
27 Enables the 'ut lib' command which tests library functions like
AKASHI Takahirof523400f2019-11-13 09:45:02 +090028 memcat(), memcyp(), memmove() and ASN1 compiler/decoder.
29
30if UT_LIB
31
32config UT_LIB_ASN1
33 bool "Unit test for asn1 compiler and decoder function"
34 default y
35 imply ASYMMETRIC_KEY_TYPE
36 imply ASYMMETRIC_PUBLIC_KEY_SUBTYPE
37 imply X509_CERTIFICATE_PARSER
38 imply PKCS7_MESSAGE_PARSER
39 imply RSA_PUBLIC_KEY_PARSER
40 help
41 Enables a test which exercises asn1 compiler and decoder function
42 via various parsers.
43
Steffen Jaeckel26dd9932021-07-08 15:57:33 +020044config UT_LIB_CRYPT
45 bool "Unit test for crypt-style password hashing"
46 depends on !SPL && AUTOBOOT_KEYED && AUTOBOOT_ENCRYPTION
47 default y
48 select CRYPT_PW
49 select CRYPT_PW_SHA256
50 select CRYPT_PW_SHA512
51 help
52 Enables a test for the crypt-style password hash functions.
53
AKASHI Takahirod090b392020-02-21 15:13:00 +090054config UT_LIB_RSA
55 bool "Unit test for rsa_verify() function"
56 depends on RSA
57 depends on RSA_VERIFY_WITH_PKEY
58 select IMAGE_SIGN_INFO
59 default y
60 help
61 Enables rsa_verify() test, currently rsa_verify_with_pkey only()
62 only, at the 'ut lib' command.
63
AKASHI Takahirof523400f2019-11-13 09:45:02 +090064endif
Heinrich Schuchardt2dd01112019-01-30 07:53:31 +010065
Heinrich Schuchardtde429d72020-10-31 08:59:25 +010066config UT_COMPRESSION
67 bool "Unit test for compression"
68 depends on UNIT_TEST
Brandon Maier65d373a2023-01-12 10:27:46 -060069 depends on CMDLINE && GZIP_COMPRESSED && BZIP2 && LZMA && LZO && LZ4 && ZSTD
Heinrich Schuchardtde429d72020-10-31 08:59:25 +010070 default y
71 help
72 Enables tests for compression and decompression routines for simple
73 sanity and for buffer overflow conditions.
74
Heinrich Schuchardt395041b2020-02-26 21:48:18 +010075config UT_LOG
76 bool "Unit tests for logging functions"
77 depends on UNIT_TEST
78 default y
79 help
80 Enables the 'ut log' command which tests logging functions like
81 log_err().
82 See also CONFIG_LOG_TEST which provides the 'log test' command.
83
Joe Hershbergerc812f722015-05-20 14:27:30 -050084config UT_TIME
Simon Glass8271f5d2015-05-02 09:25:02 -060085 bool "Unit tests for time functions"
Joe Hershbergerfeb38472015-05-20 14:27:31 -050086 depends on UNIT_TEST
Simon Glass8271f5d2015-05-02 09:25:02 -060087 help
Joe Hershbergerc812f722015-05-20 14:27:30 -050088 Enables the 'ut time' command which tests that the time functions
Simon Glass8271f5d2015-05-02 09:25:02 -060089 work correctly. The test is fairly simple and will not catch all
90 problems. But if you are having problems with udelay() and the like,
91 this is a good place to start.
92
Heinrich Schuchardtf11a1642018-08-31 21:31:28 +020093config UT_UNICODE
94 bool "Unit tests for Unicode functions"
95 depends on UNIT_TEST
96 default y
Heinrich Schuchardtd30924f2022-05-02 06:27:00 +020097 select CHARSET
Heinrich Schuchardtf11a1642018-08-31 21:31:28 +020098 help
99 Enables the 'ut unicode' command which tests that the functions for
100 manipulating Unicode strings work correctly.
101
Simon Glass19679822015-02-05 21:41:37 -0700102source "test/dm/Kconfig"
Joe Hershberger421f86f2015-05-20 14:27:36 -0500103source "test/env/Kconfig"
Sean Andersonc56468a62023-10-14 16:47:57 -0400104source "test/image/Kconfig"
Simon Glass29784d62022-08-01 07:57:59 -0600105source "test/lib/Kconfig"
Heiko Stuebner96383bd2019-10-23 16:46:41 +0200106source "test/optee/Kconfig"
Maxime Ripardf2a99422016-07-05 10:26:46 +0200107source "test/overlay/Kconfig"
Heinrich Schuchardt005acb22023-04-03 20:27:43 +0200108
Simon Glass36778df2023-09-14 10:55:44 -0600109config POST
110 bool "Power On Self Test support"
111 help
112 See doc/README.POST for more details
113
Heinrich Schuchardt005acb22023-04-03 20:27:43 +0200114endmenu