GTest should have a way to default to TAP
The Automake TAP test harness expects tests to produce TAP when invoked without options, so every GLib project that uses GTest together with the TAP harness currently has to copy/paste a tiny shell script that is basically "$1" -k --tap
and use it as a LOG_COMPILER
.
In dbus I have a hack which looks at the command-line options, and if there are none, pretends the test was invoked with --tap
. I would like this to be unnecessary. This could either be done with a programmatic interface that sets the default options from C code, or with environment variables like G_TEST_OUTPUT_TAP
or G_TEST_KEEP_GOING
.
I personally think the TAP output is just better than unstructured output, even if the tests are not run by a harness that interprets TAP: it includes g_test_message()
(which are silent by default), and because TAP was designed to be human-readable, it isn't really any harder to read than the default unstructured output.