GNOME Bugzilla – Bug 734388
libnm-core, libnm-util: convert test-crypto, test-setting-8021x.c to gtestutils
Last modified: 2014-08-07 19:58:35 UTC
Now that the libnm-glib/libnm "make check" output is nice and compact, it bothers me more that the libnm-util/libnm-core output isn't...
Created attachment 282749 [details] [review] libnm-core, libnm-util: convert test-crypto, test-setting-8021x.c to gtestutils Rather than having test-crypto and test-setting-8021x be programs that you have to pass arguments to to get them to run a single test, just have them run all of the tests themselves. This lets us get rid of the big "check-local" rule in Makefile.am and just use TESTS to run everything.
+ GError *error = NULL; + +#if !GLIB_CHECK_VERSION (2, 35, 0) + g_type_init (); +#endif + + g_test_init (&argc, &argv, NULL); + + if (!nm_utils_init (&error)) + FAIL ("nm-utils-init", "failed to initialize libnm-util: %s", error->message); I think this should be replaced by #include "nm-test-utils.h" NMTST_DEFINE (); nmtst_init (&argc, &argv, TRUE); the rest looks good
(In reply to comment #2) > I think this should be replaced by > > #include "nm-test-utils.h" > NMTST_DEFINE (); > nmtst_init (&argc, &argv, TRUE); done, and pushed as 964b9f35134559d11af3a5dc7dcfa09c86d40fc9