mirror-linux/tools/testing/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
..
configs kunit: Enable PCI on UML without triggering WARN() 2025-09-15 10:29:59 -06:00
qemu_configs kunit: qemu_configs: Add 32-bit big endian ARM configuration 2026-01-05 15:40:32 -07:00
test_data kunit: tool: Don't overwrite test status based on subtest counts 2026-01-05 15:36:08 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
kunit-completion.sh kunit: add bash completion 2026-01-20 11:17:52 -07:00
kunit.py kunit: add bash completion 2026-01-20 11:17:52 -07:00
kunit_config.py kunit: tool: fix pre-existing `mypy --strict` errors and update run_checks.py 2023-03-17 12:28:30 -06:00
kunit_json.py kunit: tool: add test counts to JSON output 2025-05-19 13:22:28 -06:00
kunit_kernel.py kunit: tool: Implement listing of available architectures 2025-04-15 10:54:50 -06:00
kunit_parser.py kunit: tool: Don't overwrite test status based on subtest counts 2026-01-05 15:36:08 -07:00
kunit_printer.py kunit: tool: Only print the summary 2024-11-19 14:52:17 -07:00
kunit_tool_test.py kunit: add bash completion 2026-01-20 11:17:52 -07:00
mypy.ini kunit: tool: undo type subscripts for subprocess.Popen 2023-05-08 08:39:41 -06:00
qemu_config.py kunit: tool: Add support for overriding the QEMU serial port 2023-04-05 12:51:06 -06:00
run_checks.py kunit: tool: undo type subscripts for subprocess.Popen 2023-05-08 08:39:41 -06:00