0001 #
0002 # KUnit base configuration
0003 #
0004
0005 menuconfig KUNIT
0006 tristate "KUnit - Enable support for unit tests"
0007 select GLOB if KUNIT=y
0008 help
0009 Enables support for kernel unit tests (KUnit), a lightweight unit
0010 testing and mocking framework for the Linux kernel. These tests are
0011 able to be run locally on a developer's workstation without a VM or
0012 special hardware when using UML. Can also be used on most other
0013 architectures. For more information, please see
0014 Documentation/dev-tools/kunit/.
0015
0016 if KUNIT
0017
0018 config KUNIT_DEBUGFS
0019 bool "KUnit - Enable /sys/kernel/debug/kunit debugfs representation" if !KUNIT_ALL_TESTS
0020 default KUNIT_ALL_TESTS
0021 help
0022 Enable debugfs representation for kunit. Currently this consists
0023 of /sys/kernel/debug/kunit/<test_suite>/results files for each
0024 test suite, which allow users to see results of the last test suite
0025 run that occurred.
0026
0027 config KUNIT_TEST
0028 tristate "KUnit test for KUnit" if !KUNIT_ALL_TESTS
0029 default KUNIT_ALL_TESTS
0030 help
0031 Enables the unit tests for the KUnit test framework. These tests test
0032 the KUnit test framework itself; the tests are both written using
0033 KUnit and test KUnit. This option should only be enabled for testing
0034 purposes by developers interested in testing that KUnit works as
0035 expected.
0036
0037 config KUNIT_EXAMPLE_TEST
0038 tristate "Example test for KUnit" if !KUNIT_ALL_TESTS
0039 default KUNIT_ALL_TESTS
0040 help
0041 Enables an example unit test that illustrates some of the basic
0042 features of KUnit. This test only exists to help new users understand
0043 what KUnit is and how it is used. Please refer to the example test
0044 itself, lib/kunit/example-test.c, for more information. This option
0045 is intended for curious hackers who would like to understand how to
0046 use KUnit for kernel development.
0047
0048 config KUNIT_ALL_TESTS
0049 tristate "All KUnit tests with satisfied dependencies"
0050 help
0051 Enables all KUnit tests, if they can be enabled.
0052 KUnit tests run during boot and output the results to the debug log
0053 in TAP format (http://testanything.org/). Only useful for kernel devs
0054 running the KUnit test harness, and not intended for inclusion into a
0055 production build.
0056
0057 For more information on KUnit and unit tests in general please refer
0058 to the KUnit documentation in Documentation/dev-tools/kunit/.
0059
0060 If unsure, say N.
0061
0062 endif # KUNIT