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.
This commit is contained in:
@@ -37,6 +37,7 @@ usage() {
|
|||||||
echo " --no-libtool: when running with valgrind, the script tries automatically to"
|
echo " --no-libtool: when running with valgrind, the script tries automatically to"
|
||||||
echo " use libtool as necessary. This disables libtool usage"
|
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 " --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 " --valgrind|-v: run under valgrind"
|
||||||
echo " --no-valgrind|-V: disable running under valgrind (overrides NMTST_USE_VALGRIND=1)"
|
echo " --no-valgrind|-V: disable running under valgrind (overrides NMTST_USE_VALGRIND=1)"
|
||||||
echo " -d: set NMTST_DEBUG=d"
|
echo " -d: set NMTST_DEBUG=d"
|
||||||
@@ -165,6 +166,10 @@ else
|
|||||||
NMTST_MAKE_FIRST=1
|
NMTST_MAKE_FIRST=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--no-make-first|-M)
|
||||||
|
NMTST_MAKE_FIRST=0
|
||||||
|
shift
|
||||||
|
;;
|
||||||
"--valgrind"|-v)
|
"--valgrind"|-v)
|
||||||
NMTST_USE_VALGRIND=1
|
NMTST_USE_VALGRIND=1
|
||||||
shift;
|
shift;
|
||||||
|
Reference in New Issue
Block a user