]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests/shell: no longer enable verbose output when selecting a test
authorThomas Haller <thaller@redhat.com>
Thu, 7 Sep 2023 22:07:21 +0000 (00:07 +0200)
committerFlorian Westphal <fw@strlen.de>
Fri, 8 Sep 2023 09:50:41 +0000 (11:50 +0200)
Previously, when selecting a test on the command line, it would also
enable verbose output (except if the "--" separator was used).

This convenience feature seems not great because the output from the
test badly clutters the "run-test.sh" output.

Now that the test results are all on disk, you can search them after the
run with great flexibility (grep).

Additionally, in previous versions, command line argument parsing was
more restrictive, requiring that "-v" always be placed first. Now, the
order does not matter, so it's easy to edit the command prompt and
append a "-v", if that is what you want. Or if you really like verbose
output, then `export VERBOSE=y`.

Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
tests/shell/run-tests.sh

index 6abb6c0c73a0ad707120a436a147a490f2a00636..bb73a771dfdc172b10580fa01d75c57da25ebacf 100755 (executable)
@@ -100,7 +100,7 @@ usage() {
        echo "OPTIONS:"
        echo " -h|--help       : Print usage."
        echo " -L|--list-tests : List test names and quit."
-       echo " -v              : Sets VERBOSE=y. Specifying tests without \"--\" enables verbose mode."
+       echo " -v              : Sets VERBOSE=y."
        echo " -g              : Sets DUMPGEN=y."
        echo " -V              : Sets VALGRIND=y."
        echo " -K              : Sets KMEMLEAK=y."
@@ -218,10 +218,7 @@ while [ $# -gt 0 ] ; do
                        shift $#
                        ;;
                *)
-                       # Any unrecognized option is treated as a test name, and also
-                       # enable verbose tests.
                        TESTS+=( "$A" )
-                       VERBOSE=y
                        ;;
        esac
 done