From: Phil Sutter Date: Mon, 6 Jul 2020 11:11:36 +0000 (+0200) Subject: tests: shell: Add help output to run-tests.sh X-Git-Tag: v1.8.6~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c03b3166d67ef9606fdf52c34cfd38a8bf78a4ab;p=thirdparty%2Fiptables.git tests: shell: Add help output to run-tests.sh The script has quite a few options nowadays, so add a bit of help text also. Signed-off-by: Phil Sutter --- diff --git a/iptables/tests/shell/run-tests.sh b/iptables/tests/shell/run-tests.sh index 2125e2cb..65c37adb 100755 --- a/iptables/tests/shell/run-tests.sh +++ b/iptables/tests/shell/run-tests.sh @@ -4,6 +4,21 @@ TESTDIR="./$(dirname $0)/" RETURNCODE_SEPARATOR="_" +usage() { + cat <&2 exit 1 @@ -50,6 +65,10 @@ while [ -n "$1" ]; do VALGRIND=y shift ;; + -h|--help) + usage + exit 0 + ;; *${RETURNCODE_SEPARATOR}+([0-9])) SINGLE+=" $1" VERBOSE=y