mirror-linux/Documentation/dev-tools/kunit
Ryota Sakamoto db0c35ca36 kunit: add bash completion
Currently, kunit.py has many subcommands and options, making it difficult
to remember them without checking the help message.

Add --list-cmds and --list-opts to kunit.py to get available commands and
options, use those outputs in kunit-completion.sh to show completion.

This implementation is similar to perf and tools/perf/perf-completion.sh.

Example output:
  $ source tools/testing/kunit/kunit-completion.sh
  $ ./tools/testing/kunit/kunit.py [TAB][TAB]
  build   config  exec    parse   run
  $ ./tools/testing/kunit/kunit.py run --k[TAB][TAB]
  --kconfig_add  --kernel_args  --kunitconfig

Link: https://lore.kernel.org/r/20260117-kunit-completion-v2-1-cabd127d0801@gmail.com
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Ryota Sakamoto <sakamo.ryota@gmail.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2026-01-20 11:17:52 -07:00
..
api clk: Add test managed clk provider/consumer APIs 2024-07-29 15:33:12 -07:00
architecture.rst Documentation: kunit: Rename references to kunit_abort() 2023-06-06 08:57:37 -06:00
faq.rst Documentation: Kunit: Add ref for other kinds of tests 2022-09-30 13:19:11 -06:00
index.rst Documentation: kunit: Fix "How Do I Use This" / "Next Steps" sections 2022-12-12 14:13:48 -07:00
kunit_suitememorydiagram.svg Documentation: KUnit: Added KUnit Architecture 2021-12-23 12:49:06 -07:00
run_manual.rst Documentation: kunit: add description of kunit.enable parameter 2025-10-27 11:16:09 -06:00
run_wrapper.rst kunit: add bash completion 2026-01-20 11:17:52 -07:00
running_tips.rst This pull request contains the following changes for UML: 2024-01-17 10:44:34 -08:00
start.rst Documentation: Kunit: add MODULE_LICENSE to sample code 2023-05-31 12:42:40 -06:00
style.rst Documentation: KUnit: Update filename best practices 2024-08-26 06:57:28 -06:00
usage.rst Documentation: kunit: Document new parameterized test features 2025-08-26 23:36:03 -06:00