Joe Hershberger | feb3847 | 2015-05-20 14:27:31 -0500 | [diff] [blame] | 1 | menuconfig 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 Hershberger | e721b88 | 2015-05-20 14:27:27 -0500 | [diff] [blame] | 8 | |
Simon Glass | ba96be4 | 2020-10-25 20:38:26 -0600 | [diff] [blame] | 9 | config 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 Schuchardt | 2dd0111 | 2019-01-30 07:53:31 +0100 | [diff] [blame] | 19 | config 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 Takahiro | f523400f | 2019-11-13 09:45:02 +0900 | [diff] [blame] | 25 | memcat(), memcyp(), memmove() and ASN1 compiler/decoder. |
| 26 | |
| 27 | if UT_LIB |
| 28 | |
| 29 | config 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 | |
AKASHI Takahiro | d090b39 | 2020-02-21 15:13:00 +0900 | [diff] [blame] | 41 | config UT_LIB_RSA |
| 42 | bool "Unit test for rsa_verify() function" |
| 43 | depends on RSA |
| 44 | depends on RSA_VERIFY_WITH_PKEY |
| 45 | select IMAGE_SIGN_INFO |
| 46 | default y |
| 47 | help |
| 48 | Enables rsa_verify() test, currently rsa_verify_with_pkey only() |
| 49 | only, at the 'ut lib' command. |
| 50 | |
AKASHI Takahiro | f523400f | 2019-11-13 09:45:02 +0900 | [diff] [blame] | 51 | endif |
Heinrich Schuchardt | 2dd0111 | 2019-01-30 07:53:31 +0100 | [diff] [blame] | 52 | |
Heinrich Schuchardt | de429d7 | 2020-10-31 08:59:25 +0100 | [diff] [blame^] | 53 | config UT_COMPRESSION |
| 54 | bool "Unit test for compression" |
| 55 | depends on UNIT_TEST |
| 56 | depends on CMDLINE && GZIP_COMPRESSED && BZIP2 && LZMA && LZO && LZ4 |
| 57 | default y |
| 58 | help |
| 59 | Enables tests for compression and decompression routines for simple |
| 60 | sanity and for buffer overflow conditions. |
| 61 | |
Heinrich Schuchardt | 395041b | 2020-02-26 21:48:18 +0100 | [diff] [blame] | 62 | config UT_LOG |
| 63 | bool "Unit tests for logging functions" |
| 64 | depends on UNIT_TEST |
| 65 | default y |
| 66 | help |
| 67 | Enables the 'ut log' command which tests logging functions like |
| 68 | log_err(). |
| 69 | See also CONFIG_LOG_TEST which provides the 'log test' command. |
| 70 | |
Joe Hershberger | c812f72 | 2015-05-20 14:27:30 -0500 | [diff] [blame] | 71 | config UT_TIME |
Simon Glass | 8271f5d | 2015-05-02 09:25:02 -0600 | [diff] [blame] | 72 | bool "Unit tests for time functions" |
Joe Hershberger | feb3847 | 2015-05-20 14:27:31 -0500 | [diff] [blame] | 73 | depends on UNIT_TEST |
Simon Glass | 8271f5d | 2015-05-02 09:25:02 -0600 | [diff] [blame] | 74 | help |
Joe Hershberger | c812f72 | 2015-05-20 14:27:30 -0500 | [diff] [blame] | 75 | Enables the 'ut time' command which tests that the time functions |
Simon Glass | 8271f5d | 2015-05-02 09:25:02 -0600 | [diff] [blame] | 76 | work correctly. The test is fairly simple and will not catch all |
| 77 | problems. But if you are having problems with udelay() and the like, |
| 78 | this is a good place to start. |
| 79 | |
Heinrich Schuchardt | f11a164 | 2018-08-31 21:31:28 +0200 | [diff] [blame] | 80 | config UT_UNICODE |
| 81 | bool "Unit tests for Unicode functions" |
| 82 | depends on UNIT_TEST |
| 83 | default y |
| 84 | help |
| 85 | Enables the 'ut unicode' command which tests that the functions for |
| 86 | manipulating Unicode strings work correctly. |
| 87 | |
Simon Glass | 1967982 | 2015-02-05 21:41:37 -0700 | [diff] [blame] | 88 | source "test/dm/Kconfig" |
Joe Hershberger | 421f86f | 2015-05-20 14:27:36 -0500 | [diff] [blame] | 89 | source "test/env/Kconfig" |
Heiko Stuebner | 96383bd | 2019-10-23 16:46:41 +0200 | [diff] [blame] | 90 | source "test/optee/Kconfig" |
Maxime Ripard | f2a9942 | 2016-07-05 10:26:46 +0200 | [diff] [blame] | 91 | source "test/overlay/Kconfig" |