Skip to content
Snippets Groups Projects
Commit 5b5bd119 authored by Guillaume Valadon's avatar Guillaume Valadon Committed by Pierre Lalet
Browse files

Travis CI improvements (#258)

parent 02ae08b4
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ matrix:
- os: osx
language: generic
env:
- SCAPY_USE_PCAPDNET=true
- SCAPY_USE_PCAPDNET=yes
# Run as root
- os: linux
......@@ -29,13 +29,13 @@ matrix:
python: 2.7
env:
- TRAVIS_SUDO=sudo
- SCAPY_USE_PCAPDNET=true
- SCAPY_USE_PCAPDNET=yes
- os: osx
language: generic
env:
- TRAVIS_SUDO=sudo
- SCAPY_USE_PCAPDNET=true
- SCAPY_USE_PCAPDNET=yes
install: bash .travis/install.sh
......
......@@ -10,7 +10,7 @@ if [ ! -z $SCAPY_USE_PCAPDNET ]
then
if [ "$TRAVIS_OS_NAME" = "linux" ]
then
$TRAVIS_SUDO apt-get install python-pcapy python-dumbnet
$TRAVIS_SUDO apt-get install python-libpcap python-dumbnet
elif [ "$TRAVIS_OS_NAME" = "osx" ]
then
mkdir -p /Users/travis/Library/Python/2.7/lib/python/site-packages
......
# Dump Scapy config
python -c "from scapy.all import *; print conf"
# Don't run tests that requires root privileges
if [ -z $TRAVIS_SUDO ]
then
UT_FLAGS="-K netaccess"
fi
# Run unit tests
# Run unit tests
cd test/
for f in *.uts
do
$TRAVIS_SUDO ./run_tests -q -F -t $f $UT_FLAGS || exit $?
$TRAVIS_SUDO ./run_tests -f text -t $f $UT_FLAGS || exit $?
done
for f in ../scapy/contrib/*.uts
do
$TRAVIS_SUDO ./run_tests -q -F -t $f $UT_FLAGS -P "load_contrib('$(basename ${f/.uts})')" || exit $?
$TRAVIS_SUDO ./run_tests -f text -t $f $UT_FLAGS -P "load_contrib('$(basename ${f/.uts})')" || exit $?
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment