diff options
author | Thomas Haller <thaller@redhat.com> | 2022-01-17 17:39:39 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-01-21 12:08:00 +0100 |
commit | eda2c5ac483844c802144478714324ee67789c2c (patch) | |
tree | d3ca8d7470b9c7252c51b09fd1b0da104864c634 | |
parent | cb9ca67901b3575711707f21a6f2d97a7de36e9a (diff) | |
download | NetworkManager-eda2c5ac483844c802144478714324ee67789c2c.tar.gz |
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.
-rwxr-xr-x | tools/run-nm-test.sh | 5 |
1 files changed, 5 insertions, 0 deletions
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; |