]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: ignore datefudge-check check when running on command line
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 25 Nov 2019 21:38:05 +0000 (22:38 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 25 Nov 2019 21:40:20 +0000 (22:40 +0100)
That allows running the tests individually without make or setting
top_builddir variable.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
tests/scripts/common.sh

index 95f8a5298e3a10175a6909ca82ef8a5699f4c883..4c7d12cf62da142ee5e616ef866e0e4ffce8d846 100644 (file)
@@ -74,13 +74,13 @@ GETPORT='
 check_for_datefudge() {
        # On certain platforms running datefudge date fails (e.g., x86 datefudge
        # with x86-64 date app).
-       if test "${SKIP_DATEFUDGE_CHECK}" = 1;then
+       if test "${SKIP_DATEFUDGE_CHECK}" = 1 || test -z "${top_builddir}";then
                return
        fi
 
-       TSTAMP=`datefudge -s "2006-09-23" "${top_builddir}/tests/datefudge-check" || true`
+       TSTAMP=`datefudge -s "2006-09-23" "${top_builddir}/tests/datefudge-check"`
        if test "$TSTAMP" != "1158969600" || test "$WINDOWS" = 1; then
-       echo $TSTAMP
+               echo "timestamp: ${TSTAMP}"
                echo "You need datefudge to run this test"
                exit 77
        fi