NetworkManager/tools
Thomas Haller 608b5f0515
tools: parse parameters to "tools/run-nm-test.sh" in mixed order
When "tools/run-nm-test.sh" is called from the build scripts,
it has as first argument "--called-from-make". Then all arguments
must follow in a well defined order, which autotools/meson understand
and follow.

Another main use is however to call "tools/run-nm-test.sh" form the command
line. In that case, we want to have the command line parsing convenient.

Some of the parameters to the script are interpreted by the script, and
some are passed on to the test. The user can use "--" to separate the
parameters:

   ./tools/run-nm-test.sh -m shared/nm-glib-aux/tests/test-shared-general -- -p /general/test_strv_cmp

Otherwise, on the first unknown argument "tools/run-nm-test.sh" would
assume all following arguments are for the test. So this worked too:

   ./tools/run-nm-test.sh -m shared/nm-glib-aux/tests/test-shared-general -p /general/test_strv_cmp

However, if you now want to run the test with valgrind, you need to edit
the command line before the test arguments, like

   ./tools/run-nm-test.sh -m shared/nm-glib-aux/tests/test-shared-general -v -p /general/test_strv_cmp

That is inconvenient because I call the script from the shell history and
the cursor is at the end of the line. Instead, assume that all unknown parameters
are for the test (until "--" is encountered).

Now this works:

   ./tools/run-nm-test.sh -m shared/nm-glib-aux/tests/test-shared-general -p /general/test_strv_cmp -v

Arguably, now also

   ./tools/run-nm-test.sh -m shared/nm-glib-aux/tests/test-shared-general -p -v /general/test_strv_cmp

works, which is a bid odd.
2021-01-22 12:13:33 +01:00
..
check-compare-generated.sh build: rename "tools/check-settings-docs.sh" to "check-compare-generated.sh" 2020-11-03 15:41:39 +01:00
check-config-options.sh tools: fix "check-config-options.sh" for detecting multiple NM_CON_DEFAULT() on one line 2020-10-30 16:52:55 +01:00
check-docs.sh tools: fix out-of-tree build test "tools/check-docs.sh" for duplicate generated sources 2019-04-23 11:45:06 +02:00
check-exports.sh tools/check-exports.sh: use ${NM} when available 2015-09-24 16:28:15 +02:00
check-gitlab-ci.sh tools: improve detection of "ci-fairy" command in "tools/check-gitlab-ci.sh" 2020-12-11 16:08:47 +01:00
create-exports-NetworkManager.sh build: fix "create-exports-NetworkManager.sh" to fail if "nm" fails 2020-10-06 13:30:50 +02:00
debug-helper.py all: reformat python files with python black 2020-06-15 16:40:38 +02:00
enums-to-docbook.pl all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
generate-docs-nm-property-infos.pl all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
generate-docs-nm-settings-docs-gir.py all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
generate-docs-nm-settings-docs-merge.py all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
meson-post-install.sh docs: add more nm-settings manpages (dbus,nmcli,keyfile,ifcfg-rh) 2020-06-11 10:53:49 +02:00
run-nm-test.sh tools: parse parameters to "tools/run-nm-test.sh" in mixed order 2021-01-22 12:13:33 +01:00
test-build.sh all: goodbye libnm-glib 2019-04-16 15:52:27 +02:00
test-networkmanager-service.py Manage deactivation of active connection 2020-10-29 09:35:10 +01:00
test-sudo-wrapper.sh nmtst: add nmtst_reexec_sudo() function 2014-06-05 18:12:57 +02:00