File: net-snmp-run-tests

package info (click to toggle)
net-snmp 5.9+dfsg-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 36,760 kB
  • sloc: ansic: 283,039; perl: 17,712; sh: 11,887; makefile: 2,705; xml: 663; python: 623; pascal: 62; sql: 47
file content (44 lines) | stat: -rwxr-xr-x 1,512 bytes parent folder | download
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
#!/bin/sh

scriptdir="$(dirname "$0")"

killall snmpd snmptrapd >/dev/null 2>&1

export SNMP_VERBOSE=1 &&
export SNMP_SAVE_TMPDIR=1 &&
make -s &&
(
      cd testing &&
      if [ -e RUNFULLTESTS ] &&
	     perl -e 'require TAP::Harness;' >/dev/null 2>&1; then
          if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
              for g in default snmpv3 unit-tests; do
                  echo "==== Test group $g ===="
	          ./RUNFULLTESTS -g $g || exit $?
                  echo "==== End of test group $g ===="
              done
	  elif [ -n "${CIRRUS_CI}" ]; then
              for g in default snmpv3 transports unit-tests; do
                  echo "==== Test group $g ===="
	          ./RUNFULLTESTS -g $g || exit $?
                  echo "==== End of test group $g ===="
              done
          else
	      ./RUNFULLTESTS -g all -e dtls -e tls
          fi
      else
	  make -s test
      fi &&
      cd .. &&
      if grep -q "PERLTARGS='perlmodules'" config.log; then
          "$scriptdir/net-snmp-run-perl-tests"
      fi
) &&
# Running the Python tests fails as follows on OS/X:
# ImportError: dlopen(/Users/travis/build/bvanassche/net-snmp/python/netsnmp/client_intf.so, 2): Library not loaded: /usr/local/net-snmp-master/lib/libnetsnmp.35.dylib
# Referenced from: /Users/travis/build/bvanassche/net-snmp/python/netsnmp/client_intf.so
# Reason: image not found
if grep -q with-python-modules config.log &&
	[ "${TRAVIS_OS_NAME}" != "osx" ]; then
    "$scriptdir/net-snmp-run-python-tests"
fi