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 604565 - [gstcheck] Update check to 0.9.8
[gstcheck] Update check to 0.9.8
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal blocker
: 0.10.26
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-12-14 18:07 UTC by LRN
Modified: 2010-01-05 01:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Updates internal check to 0.9.8 (mostly) (28.14 KB, patch)
2009-12-14 18:11 UTC, LRN
none Details | Review
alternative patch set, splits up previous patch into three plus some minor changes (43.75 KB, patch)
2009-12-18 21:33 UTC, Tim-Philipp Müller
none Details | Review
Fixed patch (26.29 KB, patch)
2009-12-19 10:33 UTC, LRN
none Details | Review

Description LRN 2009-12-14 18:07:05 UTC
0.9.8 includes some fixes that make it easier to build on Windows
Comment 1 LRN 2009-12-14 18:11:02 UTC
Created attachment 149717 [details] [review]
Updates internal check to 0.9.8 (mostly)

I've left AC_CHECK_DECLS() list as it is in check-0.9.8, though only the macro related to localtime_r is actually used in the source, because that's the only function missing on Windows. The code for others might be necessary to add from the lib subdirectory of check-0.9.8 for other platforms.
Comment 2 Tim-Philipp Müller 2009-12-18 21:33:45 UTC
Created attachment 150036 [details] [review]
alternative patch set, splits up previous patch into three plus some minor changes

Could you check this patch series to make sure it still works for you?

Basically I dropped in the code from the check-0.9.8 tarball, indented it, and then updated the autotools/Makefile stuff as you suggested (for the most part, I made some minor changes. like add/move defines into Makefile.am etc.).
Comment 3 LRN 2009-12-19 10:33:20 UTC
Created attachment 150057 [details] [review]
Fixed patch

You forgot to use #if HAVE_DECL_LOCALTIME_R instead of #ifdef HAVE_DECL_LOCALTIME_R (because HAVE_DECL_LOCALTIME_R is defined to 0 rather than undefined when the condition is false)

Otherwise - yes, everything's fine.

Just in case, i've fixed my previous patch following the diff you've posted on the pastebin. Here it is.
Comment 4 LRN 2009-12-19 10:35:41 UTC
That is, #if !HAVE_DECL_LOCALTIME_R
Comment 5 Tim-Philipp Müller 2009-12-19 14:01:42 UTC
> You forgot to use #if HAVE_DECL_LOCALTIME_R instead of #ifdef
> HAVE_DECL_LOCALTIME_R (because HAVE_DECL_LOCALTIME_R is defined to 0 rather
> than undefined when the condition is false)
> 
> Otherwise - yes, everything's fine.

Oh, true. However, something seems wrong with AC_CHECK_DECL, because even on Linux I get that defined to 0 even though I'm pretty sure it's available. AC_CHECK_FUNCS on the other hand seems to yield the right result, so I think I'll use that instead.
Comment 6 Tim-Philipp Müller 2009-12-19 14:42:41 UTC
Committed with fix for localtime_r.

commit db1acc35207d1f894de324253a276c2832738269
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Sat Dec 19 14:27:05 2009 +0000

    configure: always call our check checks for the SUBUNIT conditional
    
    The SUBUNIT conditional needs to be set even if check is disabled. Also
    remove a FIXME that is not needed any longer / after all.

commit e08cb58aa8766470295c3d0bc429bdd6a0b4e8f2
Author: Руслан Ижбулатов <lrn1986@gmail.com>
Date:   Fri Dec 18 21:28:35 2009 +0000

    check: patch internal check copy so it works with our build system
    
    Fixes #604565.

commit dd77e42e91994af4f4f3afc8c049e9fe4ddc430d
Author: Руслан Ижбулатов <lrn1986@gmail.com>
Date:   Fri Dec 18 21:26:01 2009 +0000

    check: update autotools and docs stuff for new check version

commit 8e5f17d07f2dd8a6728703b9250e6f649fa909f6
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Thu Dec 17 20:09:48 2009 +0000

    check: update internal libcheck to 0.9.8
Comment 7 Tim-Philipp Müller 2010-01-04 17:54:31 UTC
This seems to have broken something. fail_if (TRUE) does not make the tests fail any longer..
Comment 8 Tim-Philipp Müller 2010-01-05 01:40:30 UTC
This fixes it again for me:

commit 13160040c1605548e9da93f7f17d73deb3af15b6
Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
Date:   Tue Jan 5 01:35:41 2010 +0000

    check: patch internal check copy some more so that failures actually fail
    
    Include unistd.h so that _POSIX_VERSION is actually defined when
    it should be defined. Without that, stuff like fail_if(1) doesn't
    actually fail, presumably because other parts of the code do include
    unistd.h and then have _POSIX_VERSION defined.
    
    Fixes #604565 even more.

Could you double-check that fail_if(1) actually fails for you with MingW (where unistd.h is presumably not available, or does not define _POSIX_VERSION)?