After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734388 - libnm-core, libnm-util: convert test-crypto, test-setting-8021x.c to gtestutils
libnm-core, libnm-util: convert test-crypto, test-setting-8021x.c to gtestutils
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-08-07 00:31 UTC by Dan Winship
Modified: 2014-08-07 19:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libnm-core, libnm-util: convert test-crypto, test-setting-8021x.c to gtestutils (27.78 KB, patch)
2014-08-07 00:31 UTC, Dan Winship
none Details | Review

Description Dan Winship 2014-08-07 00:31:00 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...
Comment 1 Dan Winship 2014-08-07 00:31:02 UTC
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.
Comment 2 Thomas Haller 2014-08-07 11:44:51 UTC
+    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
Comment 3 Dan Winship 2014-08-07 19:58:35 UTC
(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