diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2021-04-07 21:13:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-08 10:27:02 +0300 |
commit | c82b130616e3aed2ff8c635353360978716c5762 (patch) | |
tree | 40028f07826b2e906fb7035d1367e1c704ecb971 /drivers/staging/comedi | |
parent | 5b7b4ce1d1163beb41b7c76db428c285d6989a62 (diff) | |
download | linux-c82b130616e3aed2ff8c635353360978716c5762.tar.xz |
staging: comedi: Add Kconfig options to build unit test modules
The comedi unit-test modules in "drivers/staging/comedi/drivers/tests/"
are built if the `CONFIG_COMEDI_TESTS` option is enabled, but the comedi
Kconfig file contains no code to enable the option. Add config options
to allow each of the unit-test modules to be enabled individually. The
"ni_route_tests" module depends on the "ni_routing" module, so select it
if the "ni_route_tests" module is configured to be built.
Cc: Spencer E. Olson <olsonse@umich.edu>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20210407181342.1117754-7-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/Kconfig | 33 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/tests/Makefile | 4 |
2 files changed, 35 insertions, 2 deletions
diff --git a/drivers/staging/comedi/Kconfig b/drivers/staging/comedi/Kconfig index 049b659fa6ad..1fbc517f4276 100644 --- a/drivers/staging/comedi/Kconfig +++ b/drivers/staging/comedi/Kconfig @@ -1319,4 +1319,37 @@ config COMEDI_NI_TIO config COMEDI_NI_ROUTING tristate +config COMEDI_TESTS + tristate "Comedi unit tests" + help + Enable comedi unit-test modules to be built. + + Note that the answer to this question won't directly affect the + kernel: saying N will just cause the configurator to skip all + the questions about comedi unit-test modules. + +if COMEDI_TESTS + +config COMEDI_TESTS_EXAMPLE + tristate "Comedi example unit-test module" + help + Enable support for an example unit-test module. This is just a + silly example to be used as a basis for writing other unit-test + modules. + + To compile this as a module, choose M here: the module will be called + comedi_example_test. + +config COMEDI_TESTS_NI_ROUTES + tristate "NI routing unit-test module" + select NI_ROUTING + help + Enable support for a unit-test module to test the signal routing + code used by comedi drivers for various National Instruments cards. + + To compile this as a module, choose M here: the module will be called + ni_routes_test. + +endif # COMEDI_TESTS + endif # COMEDI diff --git a/drivers/staging/comedi/drivers/tests/Makefile b/drivers/staging/comedi/drivers/tests/Makefile index a7883e406c43..5ff7cdc32a32 100644 --- a/drivers/staging/comedi/drivers/tests/Makefile +++ b/drivers/staging/comedi/drivers/tests/Makefile @@ -3,6 +3,6 @@ # ccflags-$(CONFIG_COMEDI_DEBUG) := -DDEBUG -obj-$(CONFIG_COMEDI_TESTS) += comedi_example_test.o -obj-$(CONFIG_COMEDI_TESTS) += ni_routes_test.o +obj-$(CONFIG_COMEDI_TESTS_EXAMPLE) += comedi_example_test.o +obj-$(CONFIG_COMEDI_TESTS_NI_ROUTES) += ni_routes_test.o CFLAGS_ni_routes_test.o := -DDEBUG |