Commit 78227fa0 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Shuah Khan

Documentation: kunit: Modular tests should not depend on KUNIT=y

When the documentation was updated for modular tests, the dependency on
"KUNIT=y" was forgotten to be updated, now encouraging people to create
tests that cannot be enabled when the KUNIT framework itself is modular.
Fix this by changing the dependency to "KUNIT".

Document when it is appropriate (and required) to depend on "KUNIT=y".

Fixes: c9ef2d3e ("KUnit: Docs: make start.rst example Kconfig follow style.rst")
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarDavid Gow <davidgow@google.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent e30f65c4
...@@ -256,9 +256,12 @@ Now we are ready to write the test cases. ...@@ -256,9 +256,12 @@ Now we are ready to write the test cases.
config MISC_EXAMPLE_TEST config MISC_EXAMPLE_TEST
tristate "Test for my example" if !KUNIT_ALL_TESTS tristate "Test for my example" if !KUNIT_ALL_TESTS
depends on MISC_EXAMPLE && KUNIT=y depends on MISC_EXAMPLE && KUNIT
default KUNIT_ALL_TESTS default KUNIT_ALL_TESTS
Note: If your test does not support being built as a loadable module (which is
discouraged), replace tristate by bool, and depend on KUNIT=y instead of KUNIT.
3. Add the following lines to ``drivers/misc/Makefile``: 3. Add the following lines to ``drivers/misc/Makefile``:
.. code-block:: make .. code-block:: make
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment