Debian Codegraph @

debian/tests/run-upstream-testsuite

raw symbols SCIP
1 #! /bin/sh
2
3 set -e
4
5 export srcdir=`pwd`/tests
6 export builddir=`pwd`/nonexist-builddir
7 PKGTDIR=`pwd`/b4deb/pkgtest
8
9 rm -rf "$PKGTDIR"
10 mkdir -p "$PKGTDIR" "$PKGTDIR/top_builddir/tests"
11 export top_builddir="$PKGTDIR/top_builddir"
12 export abs_top_builddir="$PKGTDIR/top_builddir"
13
14 if [ `dpkg-architecture -qDEB_HOST_ARCH_BITS` = 64 ] ; then
15 export ac_cv_sizeof_time_t=8
16 else
17 export ac_cv_sizeof_time_t=4
18 fi
19
20 cd "$PKGTDIR"
21
22 export CLI=/usr/bin/gnutls-cli \
23 SERV=/usr/bin/gnutls-serv \
24 CERTTOOL=/usr/bin/certtool P11TOOL=/usr/bin/p11tool \
25 PSKTOOL=/usr/bin/psktool DANETOOL=/usr/bin/danetool \
26 DCLI=/usr/bin/gnutls-cli-debug \
27 OCSPTOOL=/usr/bin/ocsptool \
28 ENABLE_GOST=1 \
29 ENABLE_DSA=1 \
30 PKCS12_ITER_COUNT=600000
31
32 # Set the sizeof(time_t) to the correct value for the platform, to ensure we
33 # run the correct tests.
34 if test -z "${ac_cv_sizeof_time_t}"; then
35 if [ "$(date --date=@2147483648 +%Y 2>/dev/null)" = "2038" ]; then
36 export ac_cv_sizeof_time_t=8
37 else
38 export ac_cv_sizeof_time_t=4
39 fi
40 fi
41
42 count=1
43 for i in $(find ../../tests/ -type f -name '*.sh' | \
44 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|tests/ktls_keyupdate.sh|tests/system-override-allow-rsa-pkcs1-encrypt.sh' \
45 | env LC_COLLATE=C.UTF-8 sort) ; do
46 echo "running [$count]$i ..."
47 case $(dirname $i) in
48 */tests/suite)
49 d=suite;;
50 */tests/cert-tests)
51 d=cert-tests;;
52 */tests/slow)
53 d=slow;;
54 *)
55 d="";;
56 esac
57 if env GNUTLS_SYSTEM_PRIORITY_FILE= srcdir=../../tests/$d sh $i ; then
58 echo SUCCESS [$count]$i
59 else
60 if [ $? = 77 ] ; then
61 echo SKIPPED [$count]$i
62 else
63 echo FAIL [$count]$i
64 false
65 fi
66 fi
67 count=$((${count}+1))
68 done