Skip to content

Commit 478ebc8

Browse files
Merge pull request #6 from hroncok/ci
Set up CI
2 parents ed93ee0 + 4e00b5c commit 478ebc8

File tree

4 files changed

+41
-0
lines changed

4 files changed

+41
-0
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.tox/
2+
build/
3+
dist/
4+
*.so
5+
*.pyc
6+
*.py0
7+
__pycache__

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: python
2+
python:
3+
- '2.7'
4+
- '3.5'
5+
- '3.6'
6+
dist: trusty
7+
addons:
8+
apt:
9+
packages:
10+
- libc6-dev
11+
- libnl-3-dev
12+
- libnl-route-3-dev
13+
- valgrind
14+
cache:
15+
directories:
16+
- $HOME/.cache/pip
17+
- $HOME/virtualenv/python$TRAVIS_PYTHON_VERSION/lib/python$TRAVIS_PYTHON_VERSION/site-packages
18+
- $HOME/virtualenv/python$TRAVIS_PYTHON_VERSION/bin
19+
notifications:
20+
email: false
21+
install: pip install --upgrade tox tox-travis
22+
script: tox

python-ethtool/ethtool.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
#include <sys/types.h>
2929
#include <ifaddrs.h>
3030
#include <netlink/route/addr.h>
31+
#if !defined IFF_UP
3132
#include <net/if.h>
33+
#endif
3234

3335
#include "etherinfo_struct.h"
3436
#include "etherinfo_obj.h"

tox.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[tox]
2+
envlist = py27,py35,py36
3+
[testenv]
4+
whitelist_externals = valgrind
5+
commands=
6+
python tests/parse_ifconfig.py -v
7+
python -m unittest discover -v
8+
valgrind --leak-check=full python tests/test_ethtool.py
9+
# Run all the above commands, don't worry it reports failure anyway
10+
ignore_errors = True

0 commit comments

Comments
 (0)