Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
65 lines (62 loc) · 1.71 KB

File metadata and controls

executable file
·
65 lines (62 loc) · 1.71 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#! /bin/sh
#
# Run Scapy test suite.
#
# If ran with no arguments:
# ./run_tests
# this util will run the test suite using tox, with options that should work
# regardless of the platform or the dependencies. The only dependency for this
# to work are python3 (or python) and tox.
#
# If ran with arguments, this will call UTscapy.py
#
# ATTENTION PACKAGE MAINTAINERS:
# If you do need to run Scapy tests, calling ./run_tests should be enough.
#
DIR=$(dirname "$0")/..
if [ -z "$PYTHON" ]
then
ARGS=""
for arg in "$@"
do
case $arg
in
-3) PYTHON=python3;;
-W) PYTHONWARNINGS="-W error";;
*) ARGS="$ARGS $arg";;
esac
done
PYTHON=${PYTHON:-python3}
else
ARGS="$@"
fi
$PYTHON --version > /dev/null 2>&1
if [ ! $? -eq 0 ]
then
echo "WARNING: '$PYTHON' not found, using 'python' instead."
PYTHON=python
fi
if [ -z "$ARGS" ]
then
# No arguments specified: use tox
# We use flags to disable tests that use external non tox-installed
# software.
# Check tox
tox --version >/dev/null 2>/dev/null
if [ ! $? -eq 0 ]
then
echo "ERROR: tox is not installed."
echo "You can still run ./run_tests with arguments: see ./run_tests -h"
echo "e.g. ./run_tests -t tls.uts -F"
exit 1
fi
# Run tox
export UT_FLAGS="-K tcpdump -K wireshark -K tshark -K ci_only -K vcan_socket -K automotive_comm -K imports -K scanner"
export SIMPLE_TESTS="true"
export PYTHON
export DISABLE_COVERAGE=" "
PYVER=$($PYTHON -c "import sys,platform; print(('pypy' if platform.python_implementation() == 'PyPy' else '') + '.'.join(sys.version.split('.')[:2]))")
bash ${DIR}/.config/ci/test.sh $PYVER non_root
exit $?
fi
PYTHONPATH=$DIR exec "$PYTHON" $PYTHONWARNINGS ${DIR}/scapy/tools/UTscapy.py $ARGS
Morty Proxy This is a proxified and sanitized view of the page, visit original site.