1*4882a593Smuzhiyun# 2*4882a593Smuzhiyun# KUnit base configuration 3*4882a593Smuzhiyun# 4*4882a593Smuzhiyun 5*4882a593Smuzhiyunmenuconfig KUNIT 6*4882a593Smuzhiyun tristate "KUnit - Enable support for unit tests" 7*4882a593Smuzhiyun help 8*4882a593Smuzhiyun Enables support for kernel unit tests (KUnit), a lightweight unit 9*4882a593Smuzhiyun testing and mocking framework for the Linux kernel. These tests are 10*4882a593Smuzhiyun able to be run locally on a developer's workstation without a VM or 11*4882a593Smuzhiyun special hardware when using UML. Can also be used on most other 12*4882a593Smuzhiyun architectures. For more information, please see 13*4882a593Smuzhiyun Documentation/dev-tools/kunit/. 14*4882a593Smuzhiyun 15*4882a593Smuzhiyunif KUNIT 16*4882a593Smuzhiyun 17*4882a593Smuzhiyunconfig KUNIT_DEBUGFS 18*4882a593Smuzhiyun bool "KUnit - Enable /sys/kernel/debug/kunit debugfs representation" if !KUNIT_ALL_TESTS 19*4882a593Smuzhiyun default KUNIT_ALL_TESTS 20*4882a593Smuzhiyun help 21*4882a593Smuzhiyun Enable debugfs representation for kunit. Currently this consists 22*4882a593Smuzhiyun of /sys/kernel/debug/kunit/<test_suite>/results files for each 23*4882a593Smuzhiyun test suite, which allow users to see results of the last test suite 24*4882a593Smuzhiyun run that occurred. 25*4882a593Smuzhiyun 26*4882a593Smuzhiyunconfig KUNIT_TEST 27*4882a593Smuzhiyun tristate "KUnit test for KUnit" if !KUNIT_ALL_TESTS 28*4882a593Smuzhiyun default KUNIT_ALL_TESTS 29*4882a593Smuzhiyun help 30*4882a593Smuzhiyun Enables the unit tests for the KUnit test framework. These tests test 31*4882a593Smuzhiyun the KUnit test framework itself; the tests are both written using 32*4882a593Smuzhiyun KUnit and test KUnit. This option should only be enabled for testing 33*4882a593Smuzhiyun purposes by developers interested in testing that KUnit works as 34*4882a593Smuzhiyun expected. 35*4882a593Smuzhiyun 36*4882a593Smuzhiyunconfig KUNIT_EXAMPLE_TEST 37*4882a593Smuzhiyun tristate "Example test for KUnit" if !KUNIT_ALL_TESTS 38*4882a593Smuzhiyun default KUNIT_ALL_TESTS 39*4882a593Smuzhiyun help 40*4882a593Smuzhiyun Enables an example unit test that illustrates some of the basic 41*4882a593Smuzhiyun features of KUnit. This test only exists to help new users understand 42*4882a593Smuzhiyun what KUnit is and how it is used. Please refer to the example test 43*4882a593Smuzhiyun itself, lib/kunit/example-test.c, for more information. This option 44*4882a593Smuzhiyun is intended for curious hackers who would like to understand how to 45*4882a593Smuzhiyun use KUnit for kernel development. 46*4882a593Smuzhiyun 47*4882a593Smuzhiyunconfig KUNIT_ALL_TESTS 48*4882a593Smuzhiyun tristate "All KUnit tests with satisfied dependencies" 49*4882a593Smuzhiyun help 50*4882a593Smuzhiyun Enables all KUnit tests, if they can be enabled. 51*4882a593Smuzhiyun KUnit tests run during boot and output the results to the debug log 52*4882a593Smuzhiyun in TAP format (http://testanything.org/). Only useful for kernel devs 53*4882a593Smuzhiyun running the KUnit test harness, and not intended for inclusion into a 54*4882a593Smuzhiyun production build. 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun For more information on KUnit and unit tests in general please refer 57*4882a593Smuzhiyun to the KUnit documentation in Documentation/dev-tools/kunit/. 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun If unsure, say N. 60*4882a593Smuzhiyun 61*4882a593Smuzhiyunendif # KUNIT 62