forked from easysnmp/easysnmp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (64 loc) · 1.9 KB
/
.travis.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
language: python
python:
- 2.6
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6
env:
- NET_SNMP_VERSION=5.6
- NET_SNMP_VERSION=5.6.2.1
- NET_SNMP_VERSION=5.7.2
- NET_SNMP_VERSION=5.7.3
before_install:
# Install build dependencies
- sudo apt-get update
- sudo apt-get install -y autoconf libtool make libperl-dev python-dev
# Download and extract the required version of Net-SNMP
- wget http://downloads.sourceforge.net/sourceforge/net-snmp/net-snmp-$NET_SNMP_VERSION.tar.gz
- tar zxvf net-snmp-$NET_SNMP_VERSION.tar.gz
- cd net-snmp-$NET_SNMP_VERSION
# Build and install Net-SNMP
- autoreconf -f -i
- ./configure
--prefix=/usr/local
--enable-ucd-snmp-compatibility
--enable-ipv6
--with-default-snmp-version="3"
--with-sys-contact="root@localhost"
--with-sys-location="Unknown"
--with-logfile="/var/log/snmpd.log"
--with-mib-modules="host misc/ipfwacc ucd-snmp/diskio tunnel ucd-snmp/dlmod"
--with-persistent-directory="/var/net-snmp"
- make -j4 NETSNMP_DONT_CHECK_VERSION=1
- sudo make install
- sudo ldconfig
- cd ..
# Clean up the extracted files
- rm -rf net-snmp-$NET_SNMP_VERSION
# Display the build version of Net-SNMP
- net-snmp-config --version
# Install the SNMP MIBs
- sudo apt-get install -y snmp-mibs-downloader
# Start up SNMPD with our test config
- snmpd -C -c tests/snmpd.conf
# Ensure that all mibs are loaded by the SNMP client/client library
# SNMP will prefer $HOME/.snmp/snmp.conf over /usr/local/etc/snmp.conf
- mkdir -m 0755 ~/.snmp
- echo 'mibs +ALL' > ~/.snmp/snmp.conf
install:
# Install the Coveralls library
- pip install coveralls
script:
# Run the unit tests using py.test
- python setup.py test
after_script:
# Stop the SNMPD daemon
- pkill snmpd
after_success:
# Send coverage statistics to Coveralls
coveralls
notifications:
# Disable email notifications if something fails
email: false