| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
scriptdir="$(dirname "$0")" |
| 4 |
|
| 5 |
killall snmpd snmptrapd >/dev/null 2>&1 |
| 6 |
|
| 7 |
export SNMP_VERBOSE=1 && |
| 8 |
export NOAUTODEPS=1 && |
| 9 |
export SNMP_SAVE_TMPDIR=1 && |
| 10 |
make -s && |
| 11 |
( |
| 12 |
cd testing && |
| 13 |
if [ -e RUNFULLTESTS ] && |
| 14 |
perl -e 'require TAP::Harness;' >/dev/null 2>&1; then |
| 15 |
case "$(uname)" in |
| 16 |
Darwin) |
| 17 |
for g in default snmpv3 unit-tests; do |
| 18 |
echo "==== Test group $g ====" |
| 19 |
./RUNFULLTESTS -g $g || exit $? |
| 20 |
echo "==== End of test group $g ====" |
| 21 |
done |
| 22 |
;; |
| 23 |
FreeBSD) |
| 24 |
for g in default snmpv3 transports unit-tests; do |
| 25 |
echo "==== Test group $g ====" |
| 26 |
./RUNFULLTESTS -g $g || exit $? |
| 27 |
echo "==== End of test group $g ====" |
| 28 |
done |
| 29 |
;; |
| 30 |
*) |
| 31 |
./RUNFULLTESTS -g all -e dtls -e tls |
| 32 |
;; |
| 33 |
esac |
| 34 |
else |
| 35 |
make -s test |
| 36 |
fi && |
| 37 |
cd .. && |
| 38 |
if grep -q "PERLTARGS='perlmodules'" config.log; then |
| 39 |
"$scriptdir/net-snmp-run-perl-tests" |
| 40 |
fi |
| 41 |
) && |
| 42 |
# Disable the Python tests because these fail sporadically. |
| 43 |
if false && grep -q with-python-modules config.log; then |
| 44 |
"$scriptdir/net-snmp-run-python-tests" |
| 45 |
fi |