appstream-glib icon indicating copy to clipboard operation
appstream-glib copied to clipboard

Installed tests should output TAP

Open rossburton opened this issue 5 years ago • 3 comments

From https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests:

The key Output (if specified) can only take one value at present, which is TAP. This specifies that the test outputs Test Anything Protocol.

But:

$ ginsttest-runner appstream-glib
Running test: appstream-glib/appdata-validate.test
/usr/share/appdata/eog-exif-display.metainfo.xml: OK
/usr/share/appdata/eog-export-to-folder.metainfo.xml: OK
/usr/share/appdata/eog-fit-to-width.metainfo.xml: OK
/usr/share/appdata/eog-fullscreenbg.metainfo.xml: OK
[ ... ]

That ain't TAP...

rossburton avatar Apr 07 '20 15:04 rossburton

Hmm, that installed test is just calling the same executable a user would call -- but if you really want TAP output I guess we can add it as an option. A PR would be most welcome if you have more cycles than me :(

hughsie avatar Apr 07 '20 15:04 hughsie

If it's a GLib test-case (using g_test_init() and friends), you get TAP by passing --tap to it. In newer versions of GLib, that's the default.

smcv avatar Apr 07 '20 16:04 smcv

The test is just calling the validate tool. Arguably it's a terrible test case because by e.g. installing an older version of fontforge the test fails.

rossburton avatar Apr 07 '20 16:04 rossburton