NetworkManager/include
Thomas Haller 243d0facb8 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.

(cherry picked from commit 73cb579108)
2015-11-24 11:14:48 +01:00
..
gsystem-local-alloc.h libgsystem: update copy of gsystem-local-alloc.h 2015-03-20 12:53:26 +01:00
Makefile.am build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h" 2015-09-30 23:35:52 +02:00
nm-dbus-glib-types.h core: fix new NMIP4Config and NMIP6Config properties 2014-11-07 11:09:35 -05:00
nm-glib-compat.h glib-compat: backport g_key_file_save_to_file() 2015-07-03 09:24:02 +02:00
nm-gvaluearray-compat.h all: fix up multiple-include-guard defines 2014-08-16 10:17:14 -04:00
nm-macros-internal.h macros: add nm_sprintf_buf() helper macro 2015-11-20 15:15:18 +01:00
nm-test-utils.h nmtst: support -p and -s arguments from gtestutils via $NMTST_DEBUG 2015-11-24 11:14:48 +01:00
nm-version-macros.h.in release: bump version to 1.0.8 2015-11-23 17:54:42 +01:00