linux-stable/tools
Daniel Latypov baa3331503 kunit: tool: more descriptive metavars/--help output
Before, our help output contained lines like
  --kconfig_add KCONFIG_ADD
  --qemu_config qemu_config
  --jobs jobs

They're not very helpful.

The former kind come from the automatic 'metavar' we get from argparse,
the uppercase version of the flag name.
The latter are where we manually specified metavar as the flag name.

After:
  --build_dir DIR
  --make_options X=Y
  --kunitconfig PATH
  --kconfig_add CONFIG_X=Y
  --arch ARCH
  --cross_compile PREFIX
  --qemu_config FILE
  --jobs N
  --timeout SECONDS
  --raw_output [{all,kunit}]
  --json [FILE]

This patch tries to make the code more clear by specifying the _type_ of
input we expect, e.g. --build_dir is a DIR, --qemu_config is a FILE.
I also switched it to uppercase since it looked more clearly like
placeholder text that way.

This patch also changes --raw_output to specify `choices` to make it
more clear what the options are, and this way argparse can validate it
for us, as shown by the added test case.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-04-04 16:22:14 -06:00
..
accounting delayacct: track delays from memory compact 2022-01-20 08:52:55 +02:00
arch tools headers cpufeatures: Sync with the kernel sources 2022-04-01 16:19:35 -03:00
bootconfig
bpf Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
build kbuild: replace $(if A,A,B) with $(or A,B) 2022-02-15 12:25:56 +09:00
cgroup tools/cgroup/slabinfo: update to work with struct slab 2022-02-21 11:34:49 +01:00
counter kbuild: replace $(if A,A,B) with $(or A,B) 2022-02-15 12:25:56 +09:00
debugging
edid
firewire
firmware
gpio kbuild: replace $(if A,A,B) with $(or A,B) 2022-02-15 12:25:56 +09:00
hv kbuild: replace $(if A,A,B) with $(or A,B) 2022-02-15 12:25:56 +09:00
iio Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
include tools headers UAPI: Sync drm/i915_drm.h with the kernel sources 2022-04-01 16:19:35 -03:00
io_uring
kvm/kvm_stat
laptop
leds
lib perf cpumap: More cpu map reuse by merge. 2022-04-01 16:19:35 -03:00
memory-model tools/memory-model: Explain syntactic and semantic dependencies 2022-02-01 17:32:30 -08:00
objtool Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
pci kbuild: replace $(if A,A,B) with $(or A,B) 2022-02-15 12:25:56 +09:00
pcmcia
perf perf python: Convert tracepoint.py example to python3 2022-04-01 16:19:35 -03:00
power Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
rcu
scripts Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
spi kbuild: replace $(if A,A,B) with $(or A,B) 2022-02-15 12:25:56 +09:00
testing kunit: tool: more descriptive metavars/--help output 2022-04-04 16:22:14 -06:00
thermal/tmon
time
tracing Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
usb kbuild: replace $(if A,A,B) with $(or A,B) 2022-02-15 12:25:56 +09:00
virtio tools/virtio: compile with -pthread 2022-03-28 16:52:59 -04:00
vm tools/vm/page_owner_sort.c: remove -c option 2022-04-01 11:46:09 -07:00
wmi
Makefile