Debian Codegraph @

debian/tests/run-all

raw
1 #!/bin/sh
2
3 exec 2>&1
4 set -e
5 #set -x
6
7 # test against the default OpenSSL settings and not the Debian-specific ones
8 export OPENSSL_CONF=`pwd`/debian/openssl.cnf
9
10 tests="$@"
11
12 cleanup() {
13 rm -rf "$AUTOPKGTEST_TMP"
14 }
15 if [ -z "$AUTOPKGTEST_TMP" ]; then
16 AUTOPKGTEST_TMP=$(mktemp -d)
17 trap cleanup INT TERM EXIT
18 fi
19
20 skiplist=$(readlink -f $(dirname $0))/skiplist
21 excludedir=$(readlink -f $(dirname $0))/excludes
22 cp -r 'test/' $AUTOPKGTEST_TMP
23 cp -r 'tool/' $AUTOPKGTEST_TMP
24 cd $AUTOPKGTEST_TMP
25
26 if [ -z "$tests" ]; then
27 # FIXME for now, we are excluding the tests for C extensions; couldn't figure
28 # out how to properly build them without building everything else
29 tests=$(find 'test/' -name 'test_*.rb' -and -not -path '*-ext-*' -and -not -path '*/mkmf/*' | sort)
30 fi
31
32 excludes="--excludes-dir=test/excludes/"
33 excludes="$excludes --excludes-dir=${excludedir}/any/"
34 excludes="$excludes --excludes-dir=${excludedir}/$(dpkg-architecture -qDEB_HOST_ARCH)/"
35 excludes="$excludes --excludes-dir=${excludedir}/autopkgtest/"
36
37 # dpkg-source does not allow empty file creatian via a patch, the files below
38 # are created during build time to run tests, we need to do the same for
39 # autopkgtest.
40 empty_files="$AUTOPKGTEST_TMP/test/openssl/fixtures/pkey/empty.pem"
41 for f in $empty_files; do
42 touch $f
43 done
44
45 run_tests=''
46 for t in $tests; do
47 if grep -q "^$t$" "$skiplist"; then
48 continue
49 fi
50 case "$t" in
51 test/rubygems/*)
52 continue
53 ;;
54 esac
55
56 run_tests="$run_tests $t"
57 done
58
59 ruby3.3 test/runner.rb -v $excludes --name='!/memory_leak/' $run_tests