Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: test: rework Kconfig to support modules

Rework the IIO test Kconfig to support building KUnit tests as modules.
This lets users execute tests at runtime in addition to the usual
tools/testing/kunit/kunit.py script.

Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Link: https://lore.kernel.org/r/20220710013109.3349104-6-liambeguin@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Liam Beguin and committed by
Jonathan Cameron
0565d238 cf9a4b58

+17 -7
+17 -7
drivers/iio/test/Kconfig
··· 5 5 6 6 # Keep in alphabetical order 7 7 config IIO_RESCALE_KUNIT_TEST 8 - bool "Test IIO rescale conversion functions" 9 - depends on KUNIT=y && IIO_RESCALE=y 8 + tristate "Test IIO rescale conversion functions" if !KUNIT_ALL_TESTS 9 + depends on KUNIT && IIO_RESCALE 10 10 default KUNIT_ALL_TESTS 11 11 help 12 - If you want to run tests on the iio-rescale code say Y here. 12 + Build unit tests for the iio-rescale code. 13 13 14 - This takes advantage of ARCH=um to run tests and should be used by 15 - developers to tests their changes to the rescaling logic. 14 + For more information on KUnit and unit tests in general, please refer 15 + to the KUnit documentation in Documentation/dev-tools/kunit/. 16 + 17 + If unsure, say N. 16 18 17 19 config IIO_FORMAT_KUNIT_TEST 18 - bool "Test IIO formatting functions" 19 - depends on KUNIT=y 20 + tristate "Test IIO formatting functions" if !KUNIT_ALL_TESTS 21 + depends on KUNIT 22 + default KUNIT_ALL_TESTS 23 + help 24 + build unit tests for the IIO formatting functions. 25 + 26 + For more information on KUnit and unit tests in general, please refer 27 + to the KUnit documentation in Documentation/dev-tools/kunit/. 28 + 29 + If unsure, say N.