runtime: Remove redundant subcommands from go-test.sh

go-test.sh accepts subcommands, however invoking it in the usual way via
the Makefile doesn't use them.  In fact the only remaining subcommand is
"help" and we already have another way of getting the usage information
(-h or --help).  We don't need a second way, so just drop subcommand
handling.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2022-03-30 16:03:34 +11:00
parent 0aff5aaa39
commit 34c4ac599c

View File

@ -42,8 +42,7 @@ usage()
{ {
cat <<EOF cat <<EOF
Usage: $script_name help Usage: $script_name [options]
$script_name [options] [cmd]
Options: Options:
@ -68,14 +67,6 @@ EOF
printf " --%-10.10s # %s\n" "$option" "$description" printf " --%-10.10s # %s\n" "$option" "$description"
done done
cat <<EOF
Commands:
help # Show usage.
EOF
} }
# Run a command as either root or the current user (which might still be root). # Run a command as either root or the current user (which might still be root).
@ -176,11 +167,6 @@ main()
shift shift
done done
# Consume getopt cruft
[ "$1" = "--" ] && shift
[ "$1" = "help" ] && usage && exit 0
run_coverage=no run_coverage=no
if [ "$CI" = true ] || [ -n "$KATA_DEV_MODE" ]; then if [ "$CI" = true ] || [ -n "$KATA_DEV_MODE" ]; then
run_coverage=yes run_coverage=yes