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 600618 - gtester should fail even if -k is passed
gtester should fail even if -k is passed
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2009-11-03 22:29 UTC by Ted Gould
Modified: 2009-11-23 23:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to return the number of tests failed, which on failure would be > 0 (308 bytes, patch)
2009-11-03 22:32 UTC, Ted Gould
committed Details | Review

Description Ted Gould 2009-11-03 22:29:32 UTC
If you use gtester with the -k option it continues to run tests even if one fails. Which is great. But what is not great is that it returns 0 in this case even if some of the tests fail. It should still report failure even if -k is used.

https://bugs.launchpad.net/ubuntu/+source/glib2.0/+bug/473456
Comment 1 Ted Gould 2009-11-03 22:32:12 UTC
Created attachment 146881 [details] [review]
Patch to return the number of tests failed, which on failure would be > 0
Comment 2 Cody Russell 2009-11-21 18:09:18 UTC
Seems simple enough and useful.  Matthias or Tim, is it okay to commit this one?
Comment 3 Matthias Clasen 2009-11-23 06:48:24 UTC
I think this ought to be 

 return testcase_fail_count == 0 ? 0 : 1;

since the return value of main is effectively only 8 bit and certain values have special meaning.
Comment 4 Javier Jardón (IRC: jjardon) 2009-11-23 23:18:35 UTC
Comment on attachment 146881 [details] [review]
Patch to return the number of tests failed, which on failure would be > 0

commit 04d83e8e503a07e7b4279227c8f992ddf7c6ef4e