summaryrefslogtreecommitdiff
path: root/tools/run-test-valgrind.sh
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-11-23 18:15:39 +0100
committerThomas Haller <thaller@redhat.com>2015-11-24 09:46:06 +0100
commit73cb57910835ef46d43bb92309def186e38534cf (patch)
tree83a7a1b85ee4c2d0c35d92834acf95ca3378e3ce /tools/run-test-valgrind.sh
parenta6a2fd7eef5a1aefcc7ab6d35b84a8d4c0039cd1 (diff)
downloadNetworkManager-73cb57910835ef46d43bb92309def186e38534cf.tar.gz
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.
Diffstat (limited to 'tools/run-test-valgrind.sh')
0 files changed, 0 insertions, 0 deletions