2016-08-12 11:36:08 +00:00
|
|
|
# Dump Scapy config
|
|
|
|
python -c "from scapy.all import *; print conf"
|
|
|
|
|
2016-11-09 10:25:17 +00:00
|
|
|
# Don't run tests that require root privileges
|
|
|
|
if [ -z "$TRAVIS_SUDO" -o "$TRAVIS_SUDO" = "false" ]
|
2016-05-23 14:19:25 +00:00
|
|
|
then
|
2016-10-26 08:03:37 +00:00
|
|
|
UT_FLAGS="-K netaccess "
|
2016-11-09 10:25:17 +00:00
|
|
|
TRAVIS_SUDO=""
|
2016-10-26 08:03:37 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Test AEAD modes in IPSec if available
|
|
|
|
if [ "$TEST_COMBINED_MODES" != "yes" ]
|
|
|
|
then
|
|
|
|
UT_FLAGS+="-K combined_modes "
|
2016-05-23 14:19:25 +00:00
|
|
|
fi
|
|
|
|
|
2016-08-12 11:36:08 +00:00
|
|
|
# Run unit tests
|
2016-05-23 14:19:25 +00:00
|
|
|
cd test/
|
|
|
|
|
|
|
|
for f in *.uts
|
|
|
|
do
|
2016-08-12 11:36:08 +00:00
|
|
|
$TRAVIS_SUDO ./run_tests -f text -t $f $UT_FLAGS || exit $?
|
2016-05-23 14:19:25 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
for f in ../scapy/contrib/*.uts
|
|
|
|
do
|
2016-08-12 11:36:08 +00:00
|
|
|
$TRAVIS_SUDO ./run_tests -f text -t $f $UT_FLAGS -P "load_contrib('$(basename ${f/.uts})')" || exit $?
|
2016-05-23 14:19:25 +00:00
|
|
|
done
|