mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 13:00:16 +01:00
For tests based on glib's test framework, you can select which tests to run by passing -p/-s on the command line. Usually, we want to invoke our tests via `make check` which conveniently calls valgrind (run-test-valgrind.sh) or spawns a private D-Bus server (libnm-test-launch.sh, libnm-glib-test-launch.sh). At that point, it is not directly possible to specify command line arguments for the tests, which is why it is convenient to specify arguments via $NMTST_DEBUG environment variable. Parse "p" and "s" arguments from $NMTST_DEBUG and pass them to g_test_init() to select which tests to run. NMTST_DEBUG=p=/core/general/test_setting_ip4_changed_signal ./libnm-core/tests/test-general However, there is a problem here: in gtestutils, -p/-s conflicts with --tap, which is how our Makefile invokes the tests. Thus the new options explicitly don't work when being called during `make check`. Which makes this much less useful. I only noticed that afterwards, so still keep the patch because it might still be convenient during developing tests to set the environment variable once, and then repeatedly spawn the tests, without specifying -p/-s. |
||
|---|---|---|
| .. | ||
| gsystem-local-alloc.h | ||
| Makefile.am | ||
| nm-dbus-compat.h | ||
| nm-default.h | ||
| nm-glib.h | ||
| nm-macros-internal.h | ||
| nm-test-utils.h | ||
| nm-version-macros.h.in | ||