Skip to content

Commit

Permalink
runtime: Remove redundant subcommands from go-test.sh
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
dgibson committed May 13, 2022
1 parent 0aff5aa commit 34c4ac5
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/runtime/go-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ usage()
{
cat <<EOF
Usage: $script_name help
$script_name [options] [cmd]
Usage: $script_name [options]
Options:
Expand All @@ -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).
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 34c4ac5

Please sign in to comment.