]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: updates for certtool test to run under windows
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 26 Nov 2015 08:32:25 +0000 (09:32 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 26 Nov 2015 08:32:41 +0000 (09:32 +0100)
tests/cert-tests/Makefile.am
tests/cert-tests/certtool

index 2edfc0a8c1d056978229c0179741641389b6a2f9..630d0f1a4ddc516791d9051751e04f235e29a7f5 100644 (file)
@@ -68,3 +68,7 @@ TESTS_ENVIRONMENT = EXEEXT=$(EXEEXT) \
 if ENABLE_FIPS140
 TESTS_ENVIRONMENT += FIPS140=1
 endif
+
+if WINDOWS
+TESTS_ENVIRONMENT += WINDOWS=1
+endif
index 46309b3aedf56c2dad7a38756d207403ae499dc1..c814de7002daed720e4344adc7ea0171e8c026af 100755 (executable)
@@ -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