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