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