gtester support deprecated in GLib



Hi all,

A quick notification: the `gtester` utility, and support for its format
for outputting results from unit tests, has been deprecated in GLib.

https://gitlab.gnome.org/GNOME/glib/issues/1441

`gtester` is a test harness, and has been de-facto deprecated for a
long time, but now it will output deprecation warnings everywhere. We
won’t drop it from GLib until we break API (which is not planned to
happen), but it’s not going to be maintained either.

Instead of `gtester`, you should be using TAP output and an external
test harness which can parse it. Unit tests now default to using TAP
(unless you run them under `gtester`):

https://gitlab.gnome.org/GNOME/glib/issues/1619

This was previously available by passing the `--tap` option to unit
tests — you now no longer need to do that (but it’s harmless to
continue doing so, for backwards compatibility).

TAP is a structured format for passing unit test results from the tests
to the test harness:

https://testanything.org/

It’s supported natively by Meson since 0.50 using the `protocol`
argument to `test()`:

https://mesonbuild.com/Reference-manual.html#test

It’s supported in autotools by using the glib-tap.mk helper, as
documented on this StackOverflow answer:

https://stackoverflow.com/a/19975406/2931197

Let me know if you have any questions.

Philip

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]