diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 07:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 07:33:14 +0000 |
commit | 99db386956013535171c924df0cfc024f2197339 (patch) | |
tree | 002b011f06152f99888cabf1cc528c1d53da17a9 /debian/tests/run-upstream-testsuite | |
parent | Adding upstream version 3.7.9. (diff) | |
download | gnutls28-99db386956013535171c924df0cfc024f2197339.tar.xz gnutls28-99db386956013535171c924df0cfc024f2197339.zip |
Adding debian version 3.7.9-2+deb12u2.debian/3.7.9-2+deb12u2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/run-upstream-testsuite')
-rwxr-xr-x | debian/tests/run-upstream-testsuite | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/debian/tests/run-upstream-testsuite b/debian/tests/run-upstream-testsuite new file mode 100755 index 0000000..d59c898 --- /dev/null +++ b/debian/tests/run-upstream-testsuite @@ -0,0 +1,73 @@ +#! /bin/sh + +set -e + +export srcdir=`pwd`/tests +export builddir=`pwd`/nonexist-builddir +PKGTDIR=`pwd`/b4deb/pkgtest + +rm -rf "$PKGTDIR" +mkdir -p "$PKGTDIR" "$PKGTDIR/top_builddir/tests" +export top_builddir="$PKGTDIR/top_builddir" + +printandrun() +{ + echo "$@" + "$@" +} + +printandrun \ + gcc \ + `env DEB_BUILD_MAINT_OPTIONS="hardening=+bindnow" dpkg-buildflags --get CPPFLAGS` \ + `env DEB_BUILD_MAINT_OPTIONS="hardening=+bindnow" dpkg-buildflags --get CFLAGS` \ + `env DEB_BUILD_MAINT_OPTIONS="hardening=+bindnow" dpkg-buildflags --get LDFLAGS` \ + -o ${top_builddir}/tests/datefudge-check tests/datefudge-check.c + +cd "$PKGTDIR" + +export CLI=/usr/bin/gnutls-cli \ + SERV=/usr/bin/gnutls-serv \ + CERTTOOL=/usr/bin/certtool P11TOOL=/usr/bin/p11tool \ + PSKTOOL=/usr/bin/psktool DANETOOL=/usr/bin/danetool \ + DCLI=/usr/bin/gnutls-cli-debug \ + OCSPTOOL=/usr/bin/ocsptool \ + ENABLE_GOST=1 \ + PKCS12_ITER_COUNT=600000 + +# Set the sizeof(time_t) to the correct value for the platform, to ensure we +# run the correct tests. +if test -z "${ac_cv_sizeof_time_t}"; then + if [ "$(date --date=@2147483648 +%Y 2>/dev/null)" = "2038" ]; then + export ac_cv_sizeof_time_t=8 + else + export ac_cv_sizeof_time_t=4 + fi +fi + +count=1 +for i in $(find ../../tests/ -type f -perm -u+rx | \ + grep -Ev 'tests/gnutls-cli-debug.sh|tests/system-override-hash.sh|tests/pkgconfig.sh|tests/system-override-sig.sh|tests/system-override-sig-allowlist.sh|tests/system-override-sig-tls.sh|tests/tls13/prf-early.sh|tests/dtls/dtls.sh|tests/dtls/dtls-resume.sh|tests/cert-tests/tolerate-invalid-time.sh|tests/slow/|tests/protocol-set-allowlist.sh|tests/system-override-hash-allowlist.sh|tests/system-override-curves-allowlist.sh|tests/ktls.sh' \ + | env LC_COLLATE=C.UTF-8 sort) ; do + echo "running [$count]$i ..." + case $(dirname $i) in + */tests/suite) + d=suite;; + */tests/cert-tests) + d=cert-tests;; + */tests/slow) + d=slow;; + *) + d="";; + esac + if env srcdir=../../tests/$d $i ; then + echo SUCCESS [$count]$i + else + if [ $? = 77 ] ; then + echo SKIPPED [$count]$i + else + echo FAIL [$count]$i + false + fi + fi + count=$((${count}+1)) +done |