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 722651 - Don't run tests that depend on disabled loaders
Don't run tests that depend on disabled loaders
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-20 20:53 UTC by Ross Burton
Modified: 2014-01-25 21:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Respect loaders being disabled in the test sutie (5.50 KB, patch)
2014-01-20 20:54 UTC, Ross Burton
reviewed Details | Review

Description Ross Burton 2014-01-20 20:53:52 UTC
The PNG, JPEG, JPEG2000 and TIFF loaders depend on external libraries and so can be disabled.

The test suite assumes they're available.  This can result in the test suite failing some loaders are disabled.
Comment 1 Ross Burton 2014-01-20 20:54:16 UTC
Created attachment 266804 [details] [review]
Respect loaders being disabled in the test sutie
Comment 2 Ross Burton 2014-01-20 20:54:43 UTC
This patch uses g_test_skip() where possible but it seems that gnome-desktop-testing-runner doesn't know about skipped tests and still counts them as failed.
Comment 3 Ross Burton 2014-01-20 21:53:12 UTC
To elaborate on the previous comment, this happens:

root@nuc:~# gnome-desktop-testing-runner gdk-pixbuf/pixbuf-stream
Running test: /usr/share/installed-tests/gdk-pixbuf/pixbuf-stream.test
# random seed: R02Sa05820724ebe9b32697f09e5235c16ce
ok 1 /pixbuf/stream # SKIP PNG loader not enabled
ok 2 /pixbuf/stream/async # SKIP PNG loader not enabled
ok 3 /pixbuf/stream/scale # SKIP PNG loader not enabled
ok 4 /pixbuf/stream/scale/async # SKIP PNG loader not enabled
1..4
Test gdk-pixbuf/pixbuf-stream.test failed: Child process exited with code 4
SUMMARY: total: 1 passed: 0 skipped: 0 failed: 1

Unless GTest can be taught to detect tests that entirely skip, it's probably best to change stream to use the same disabling idiom as the other tests I patched.
Comment 4 Matthias Clasen 2014-01-20 21:57:51 UTC
Review of attachment 266804 [details] [review]:

Apart from configure defining HAVE_... and the code using WITH_, I think it would be nicer to do this with a runtime check, using gdk_pixbuf_get_formats

::: tests/pixbuf-icc.c
@@ +77,3 @@
   g_test_init (&argc, &argv, NULL);
 
+#if WITH_LIBPNG

Mismatch between WITH and HAVE ?
Comment 5 Matthias Clasen 2014-01-20 22:10:31 UTC
See bug 709894 for the all-testcases-skipped issue