[gnutls-devel] GnuTLS | Add CI tarball build (!809)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed Nov 21 21:46:56 CET 2018


Tim Rühsen commented on a discussion on tests/cert-tests/certtool-ecdsa:

>  	exit 1
>  fi
>  
> -$DIFF -I 'Not After:' ${TMPFILE} "${srcdir}/data/cert-ecc256-full.pem"
> +$DIFF ${TMPFILE} "${srcdir}/data/cert-ecc256-full.pem"

If have it ready - is it ok to add in common.sh ?
```
# $1, $2: the two files to check for equality
# $3: Strings to be ignored, separated by |
assert_equal() {
        local tmp1=`basename "$1"`
        local tmp2=`basename "$2"`

        if test -n "$3"; then
                local tmp1=`basename "$1"`"1.tmp"
                local tmp2=`basename "$2"`"2.tmp"
                grep -v "$3" "$1" | tr -d '\r' >"$tmp1"
                grep -v "$3" "$2" | tr -d '\r' >"$tmp2"
                diff "$tmp1" "$tmp2"
                local rc=$?
                rm -f "$tmp1" "$tmp2"
                return $rc
        fi

        diff "$1" "$2"
        return $?
}
```

Using it as
```
assert_equal ${TMPFILE} "${srcdir}/data/cert-eddsa.pem" "Not After:"
if test $? != 0; then
  ...
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/merge_requests/809#note_119187485
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20181121/85eaef3a/attachment.html>


More information about the Gnutls-devel mailing list