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 711796 - glib-tap.mk: fix to actually use the TAP driver
glib-tap.mk: fix to actually use the TAP driver
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2013-11-10 20:10 UTC by Dan Winship
Modified: 2013-11-23 06:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib/tests/include: port to gtester (883 bytes, patch)
2013-11-10 20:10 UTC, Dan Winship
committed Details | Review
gtestutils: add "options" to g_test_init(), make option-argv0 use gtester (4.56 KB, patch)
2013-11-10 20:10 UTC, Dan Winship
committed Details | Review
gio/tests: basic-application is a helper program, not a test (978 bytes, patch)
2013-11-10 20:10 UTC, Dan Winship
committed Details | Review
gio/tests: fix output of gdbus-proxy-threads and gdbus-threading (2.69 KB, patch)
2013-11-10 20:10 UTC, Dan Winship
committed Details | Review
glib-tap.mk: fix to actually use the TAP driver (21.28 KB, patch)
2013-11-10 20:10 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2013-11-10 20:10:29 UTC
glib-tap.mk wasn't actually using the TAP driver. (See the last
patch.) Fixing this pointed out a few tests that didn't pass in --tap
mode.

(Note in particular the second patch, which declares the reserved
"..." argument to g_test_init() to be no longer reserved.)
Comment 1 Dan Winship 2013-11-10 20:10:31 UTC
Created attachment 259456 [details] [review]
glib/tests/include: port to gtester
Comment 2 Dan Winship 2013-11-10 20:10:34 UTC
Created attachment 259457 [details] [review]
gtestutils: add "options" to g_test_init(), make option-argv0 use gtester

Declare that the previously-unused "..." argument to g_test_init() is
actually a NULL-terminated list of strings indicating testing options,
and add an option "no_g_set_prgname", which keeps g_test_init() from
calling g_set_prgname(). Then we can port glib/tests/option-argv0 to
use gtester, by passing that option.
Comment 3 Dan Winship 2013-11-10 20:10:36 UTC
Created attachment 259458 [details] [review]
gio/tests: basic-application is a helper program, not a test
Comment 4 Dan Winship 2013-11-10 20:10:39 UTC
Created attachment 259459 [details] [review]
gio/tests: fix output of gdbus-proxy-threads and gdbus-threading

Make gdbus-proxy-threads and gdbus-threading print a newline at the
end of their progress strings, to avoid messing up their TAP-format
output.
Comment 5 Dan Winship 2013-11-10 20:10:42 UTC
Created attachment 259460 [details] [review]
glib-tap.mk: fix to actually use the TAP driver

The Makefile rules in glib-tap.mk were copied from an example that
assumed that all the test programs had names ending in ".test", so
they didn't actually have any effect for us and resulted in us still
using the standard automake test driver. Fix this so we actually do
use TAP now.
Comment 6 Matthias Clasen 2013-11-23 04:52:37 UTC
Review of attachment 259456 [details] [review]:

ok
Comment 7 Matthias Clasen 2013-11-23 04:56:00 UTC
Review of attachment 259457 [details] [review]:

::: glib/gtestutils.c
@@ +630,3 @@
 };
 const GTestConfig * const g_test_config_vars = &mutable_test_config_vars;
+static GHashTable *test_options;

hmm, as long as we only have a single option, I would probably just go with a static gboolean no_g_set_prgname
Comment 8 Matthias Clasen 2013-11-23 04:56:26 UTC
Review of attachment 259458 [details] [review]:

ok
Comment 9 Matthias Clasen 2013-11-23 04:57:10 UTC
Review of attachment 259459 [details] [review]:

ok
Comment 10 Matthias Clasen 2013-11-23 04:57:33 UTC
Review of attachment 259460 [details] [review]:

oops, ok
Comment 11 Matthias Clasen 2013-11-23 06:02:52 UTC
Attachment 259456 [details] pushed as f733075 - glib/tests/include: port to gtester
Attachment 259457 [details] pushed as 41eacde - gtestutils: add "options" to g_test_init(), make option-argv0 use gtester
Attachment 259458 [details] pushed as c762a3a - gio/tests: basic-application is a helper program, not a test
Attachment 259459 [details] pushed as 8f5b40c - gio/tests: fix output of gdbus-proxy-threads and gdbus-threading
Attachment 259460 [details] pushed as be231c6 - glib-tap.mk: fix to actually use the TAP driver