X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/2a3a5063bbebd11132482668d962f3e4f70ee6c9..a81f0f5b213ff4bf7f273fd89c5b152176afa638:/testsuite.at diff --git a/testsuite.at b/testsuite.at index c87123b..025e78f 100644 --- a/testsuite.at +++ b/testsuite.at @@ -3,6 +3,36 @@ License GPLv2+: GNU General Public License version 2 or any later version. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.]) +dnl mtime_uptodate file-a file-b: returns success iff file-a's modification +dnl time is at least as new as file-b's. +m4_divert_push([PREPARE_TESTS])dnl +mtime_uptodate () { + cat >mtime-uptodate.mk </dev/null 2>&1 || return 1 +} +m4_divert_pop([PREPARE_TESTS]) + +dnl TEST_MTIME_DELAY +dnl +dnl Delay script execution such that file modifications done prior to the +dnl delay will have older timestamps than file modifications performed after +dnl the delay. +dnl +dnl Some filesystems have insufficient timestamp resolution (or maybe +dnl computers are just too fast) to reliably distinguish between back-to-back +dnl file modification. +dnl +dnl This delay is implemented by repeatingly touching files until a different +dnl timestamp is produced. +m4_define([TEST_MTIME_DELAY], +[touch mtime-delay.old; touch mtime-delay.new +while mtime_uptodate mtime-delay.old mtime-delay.new; do + touch mtime-delay.new +done]) + dnl Compile a C source file with default cflags for libgobject. The test dnl group is skipped if libgobject was not enabled at configure time. The dnl first argument contains extra compiler flags, which must include the @@ -63,8 +93,14 @@ CPPFLAGS="-I$builddir $CPPFLAGS" command -v $AUTOCONF (set -x; $AUTOCONF --version) 2>&1 echo + AS_UNSET([MAKEFLAGS]) + AS_ECHO(["MAKE = ${MAKE=make}"]) + command -v $MAKE + (set -x; $MAKE --version) 2>&1 + echo } >&AS_MESSAGE_LOG_FD m4_divert_pop([PREPARE_TESTS]) m4_include([tests/general.at]) +m4_include([tests/options.at]) m4_include([tests/interface.at])