From eda2c5ac483844c802144478714324ee67789c2c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 17 Jan 2022 17:39:39 +0100 Subject: tools: support --no-make-first option in "run-nm-test.sh" Why? Because I often use a command line like $ ./tools/run-nm-test.sh -m src/libnm-client-impl/tests/test-nm-client -p /libnm/device-connection-compatibility or even alias it to a one character command `x`. Usually I want to do the rebuild, and as `make` is so slow, it adds noticeable time running the command. Thus, sometimes I want to modify the command, for which I have to edit the command from the history, or toggle two separate commands. Add a `-M` flag that can reverse the effect of an earlier `-m`. An "enable" flag in general should just also have a "disable" flag. --- tools/run-nm-test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/run-nm-test.sh b/tools/run-nm-test.sh index 230a7a66e1..b1d3dd939a 100755 --- a/tools/run-nm-test.sh +++ b/tools/run-nm-test.sh @@ -37,6 +37,7 @@ usage() { echo " --no-libtool: when running with valgrind, the script tries automatically to" echo " use libtool as necessary. This disables libtool usage" echo " --make-first|-m: before running the test, make it (only works with autotools build)" + echo " --no-make-first|-M: disable --make-first option" echo " --valgrind|-v: run under valgrind" echo " --no-valgrind|-V: disable running under valgrind (overrides NMTST_USE_VALGRIND=1)" echo " -d: set NMTST_DEBUG=d" @@ -165,6 +166,10 @@ else NMTST_MAKE_FIRST=1 shift ;; + --no-make-first|-M) + NMTST_MAKE_FIRST=0 + shift + ;; "--valgrind"|-v) NMTST_USE_VALGRIND=1 shift; -- cgit v1.2.1