mirror of https://github.com/secdev/scapy.git
Travis CI improvements (#258)
This commit is contained in:
parent
02ae08b4ad
commit
5b5bd11933
|
@ -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
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
# 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
|
||||
|
|
Loading…
Reference in New Issue