162306a36Sopenharmony_ci# 262306a36Sopenharmony_ci# KUnit base configuration 362306a36Sopenharmony_ci# 462306a36Sopenharmony_ci 562306a36Sopenharmony_cimenuconfig KUNIT 662306a36Sopenharmony_ci tristate "KUnit - Enable support for unit tests" 762306a36Sopenharmony_ci select GLOB 862306a36Sopenharmony_ci help 962306a36Sopenharmony_ci Enables support for kernel unit tests (KUnit), a lightweight unit 1062306a36Sopenharmony_ci testing and mocking framework for the Linux kernel. These tests are 1162306a36Sopenharmony_ci able to be run locally on a developer's workstation without a VM or 1262306a36Sopenharmony_ci special hardware when using UML. Can also be used on most other 1362306a36Sopenharmony_ci architectures. For more information, please see 1462306a36Sopenharmony_ci Documentation/dev-tools/kunit/. 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ciif KUNIT 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ciconfig KUNIT_DEBUGFS 1962306a36Sopenharmony_ci bool "KUnit - Enable /sys/kernel/debug/kunit debugfs representation" if !KUNIT_ALL_TESTS 2062306a36Sopenharmony_ci default KUNIT_ALL_TESTS 2162306a36Sopenharmony_ci help 2262306a36Sopenharmony_ci Enable debugfs representation for kunit. Currently this consists 2362306a36Sopenharmony_ci of /sys/kernel/debug/kunit/<test_suite>/results files for each 2462306a36Sopenharmony_ci test suite, which allow users to see results of the last test suite 2562306a36Sopenharmony_ci run that occurred. 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ciconfig KUNIT_TEST 2862306a36Sopenharmony_ci tristate "KUnit test for KUnit" if !KUNIT_ALL_TESTS 2962306a36Sopenharmony_ci default KUNIT_ALL_TESTS 3062306a36Sopenharmony_ci help 3162306a36Sopenharmony_ci Enables the unit tests for the KUnit test framework. These tests test 3262306a36Sopenharmony_ci the KUnit test framework itself; the tests are both written using 3362306a36Sopenharmony_ci KUnit and test KUnit. This option should only be enabled for testing 3462306a36Sopenharmony_ci purposes by developers interested in testing that KUnit works as 3562306a36Sopenharmony_ci expected. 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ciconfig KUNIT_EXAMPLE_TEST 3862306a36Sopenharmony_ci tristate "Example test for KUnit" if !KUNIT_ALL_TESTS 3962306a36Sopenharmony_ci default KUNIT_ALL_TESTS 4062306a36Sopenharmony_ci help 4162306a36Sopenharmony_ci Enables an example unit test that illustrates some of the basic 4262306a36Sopenharmony_ci features of KUnit. This test only exists to help new users understand 4362306a36Sopenharmony_ci what KUnit is and how it is used. Please refer to the example test 4462306a36Sopenharmony_ci itself, lib/kunit/example-test.c, for more information. This option 4562306a36Sopenharmony_ci is intended for curious hackers who would like to understand how to 4662306a36Sopenharmony_ci use KUnit for kernel development. 4762306a36Sopenharmony_ci 4862306a36Sopenharmony_ciconfig KUNIT_ALL_TESTS 4962306a36Sopenharmony_ci tristate "All KUnit tests with satisfied dependencies" 5062306a36Sopenharmony_ci help 5162306a36Sopenharmony_ci Enables all KUnit tests, if they can be enabled. 5262306a36Sopenharmony_ci KUnit tests run during boot and output the results to the debug log 5362306a36Sopenharmony_ci in TAP format (http://testanything.org/). Only useful for kernel devs 5462306a36Sopenharmony_ci running the KUnit test harness, and not intended for inclusion into a 5562306a36Sopenharmony_ci production build. 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci For more information on KUnit and unit tests in general please refer 5862306a36Sopenharmony_ci to the KUnit documentation in Documentation/dev-tools/kunit/. 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci If unsure, say N. 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ciconfig KUNIT_DEFAULT_ENABLED 6362306a36Sopenharmony_ci bool "Default value of kunit.enable" 6462306a36Sopenharmony_ci default y 6562306a36Sopenharmony_ci help 6662306a36Sopenharmony_ci Sets the default value of kunit.enable. If set to N then KUnit 6762306a36Sopenharmony_ci tests will not execute unless kunit.enable=1 is passed to the 6862306a36Sopenharmony_ci kernel command line. 6962306a36Sopenharmony_ci 7062306a36Sopenharmony_ci In most cases this should be left as Y. Only if additional opt-in 7162306a36Sopenharmony_ci behavior is needed should this be set to N. 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_ciendif # KUNIT 74