[Pkg-cmake-team] Bug#815231: cmake: FTBFS on kfreebsd, hurd: 2 tests fail: BuildDepends, RunCMake.Configure

Steven Chamberlain steven at pyro.eu.org
Wed Apr 6 21:42:21 UTC 2016


Hi,

Andreas Beckmann wrote:
> The following tests FAILED:
> 	113 - BuildDepends (Failed)

I finally figured this out!

The BuildDepends test will fail when run on a filesystem not having
sub-second granularity.  So for example, it fails on kfreebsd UFS, and
whatever filesystem the hurd-i386 buildds have, and also maybe some
Linux fileystems too.

| if(EXISTS ${BuildDepends_BINARY_DIR}/Project/multi2-real.txt)
|   if(${BuildDepends_BINARY_DIR}/Project/multi2-real.txt
|       IS_NEWER_THAN ${BuildDepends_BINARY_DIR}/Project/multi2-stamp.txt)
|     message(STATUS "multi2-real.txt is newer than multi2-stamp.txt")
|   else()
|     message(SEND_ERROR "Project did not initially build properly: "
|       "multi2-real.txt is not newer than multi2-stamp.txt")

If multi2-real.txt and multi2-stamp.txt are created within 1 second of
each other, the test will most likely fail on those filesystems.

I think the testcase should allow something like "newer or equal to".
I don't know if there's a CMake macro to do exactly that.

By reversing the operands and the logic, it is possible to test for
"multi2-stamp.txt newer than multi2-real.txt" as a failure condition,
and therefore "multi2-real.txt newer or equal to multi2-stamp.txt" will
be regarded a success, which is exactly what we want here.

A patch is attached.  I can't test it fully, because my kfreebsd systems
are not affected by this bug:  they use ZFS, which does have sub-second
file timestamps.  At least with this patch applied I didn't see any
regression, and on UFS... I feel lucky that this will fix it.


> 	292 - RunCMake.Configure (Failed)

I didn't look at that other test failure yet...

Regards,
-- 
Steven Chamberlain
steven at pyro.eu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-BuildDepends.patch
Type: text/x-diff
Size: 3649 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-cmake-team/attachments/20160406/81d8f5be/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-cmake-team/attachments/20160406/81d8f5be/attachment.sig>


More information about the Pkg-cmake-team mailing list