From: Nikos Mavrogiannopoulos Date: Thu, 26 Nov 2015 08:32:25 +0000 (+0100) Subject: tests: updates for certtool test to run under windows X-Git-Tag: gnutls_3_5_0~517 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db0dc9e30e25ba8de7dd166b2ab4788df0642719;p=thirdparty%2Fgnutls.git tests: updates for certtool test to run under windows --- diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am index 2edfc0a8c1..630d0f1a4d 100644 --- a/tests/cert-tests/Makefile.am +++ b/tests/cert-tests/Makefile.am @@ -68,3 +68,7 @@ TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \ if ENABLE_FIPS140 TESTS_ENVIRONMENT += FIPS140=1 endif + +if WINDOWS +TESTS_ENVIRONMENT += WINDOWS=1 +endif diff --git a/tests/cert-tests/certtool b/tests/cert-tests/certtool index 46309b3aed..c814de7002 100755 --- a/tests/cert-tests/certtool +++ b/tests/cert-tests/certtool @@ -52,7 +52,7 @@ if test "${id}" != "1e09d707d4e3651b84dcb6c68a828d2affef7ec3"; then exit 1 fi -id=`"${CERTTOOL}" --pubkey-info <"${srcdir}/funny-spacing.pem"|"${CERTTOOL}" --key-id --hash sha256` +id=`"${CERTTOOL}" --pubkey-info <"${srcdir}/funny-spacing.pem"|"${CERTTOOL}" --key-id --hash sha256| tr -d '\r'` rc=$? if test "${id}" != "118e72e3655150c895ecbd19b3634179fb4a87c7a25abefcb11f5d66661d5a4d"; then @@ -81,7 +81,7 @@ export TZ="UTC" # Check for datefudge TSTAMP=`datefudge "2006-09-23" date -u +%s || true` -if test "$TSTAMP" != "1158969600"; then +if test "$TSTAMP" != "1158969600" || test "$WINDOWS" = 1; then echo $TSTAMP echo "You need datefudge to run this test" exit 77