NetworkManager/include
Thomas Haller 73cb579108 nmtst: support -p and -s arguments from gtestutils via $NMTST_DEBUG
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.
2015-11-24 09:46:06 +01:00
..
gsystem-local-alloc.h libgsystem: update copy of gsystem-local-alloc.h 2015-03-12 18:09:29 +01:00
Makefile.am build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h" 2015-09-30 23:10:29 +02:00
nm-dbus-compat.h include: add nm-dbus-compat.h 2015-07-24 13:25:47 -04:00
nm-default.h all: add C99's "bool" define 2015-11-18 13:25:21 +01:00
nm-glib.h glib-compat: add g_hash_table_get_keys_as_array() compat function 2015-10-01 09:05:08 +02:00
nm-macros-internal.h macros: avoid signed overflow in nm_utils_is_power_of_two() 2015-11-15 11:13:29 +01:00
nm-test-utils.h nmtst: support -p and -s arguments from gtestutils via $NMTST_DEBUG 2015-11-24 09:46:06 +01:00
nm-version-macros.h.in build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h" 2015-09-30 23:10:29 +02:00