Skip to content
Snippets Groups Projects
Commit c1696e49 authored by Guillaume Valadon's avatar Guillaume Valadon Committed by GitHub
Browse files

Merge pull request #860 from p-l-/fix-py3-tests

Fix a Python 3 test + rename executables
parents 518403f9 fcb19b49
No related branches found
No related tags found
No related merge requests found
#! /bin/sh
DIR=$(dirname $0)
if python --version 2>&1 | grep -q '^Python 2'; then
PYTHON=python
else
PYTHON=python2
fi
PYTHONDONTWRITEBYTECODE=True
PYTHON=${PYTHON:-python}
PYTHONPATH=$DIR exec $PYTHON -m scapy.__init__ $@
#! /bin/sh
DIR=$(dirname $0)
PYTHONDONTWRITEBYTECODE="True" # Disable __pycache__
PYTHONPATH=$DIR exec python3 -m scapy.__init__ $@
#! /bin/sh
PYTHON=python2
source $(dirname $0)/run_scapy "$@"
#! /bin/sh
PYTHON=python3
source $(dirname $0)/run_scapy "$@"
......@@ -2271,7 +2271,7 @@ raw(ICMPv6NDOptRedirectedHdr()) == b'\x04\x01\x00\x00\x00\x00\x00\x00'
= ICMPv6NDOptRedirectedHdr - Instantiation with specific values
~ ICMPv6NDOptRedirectedHdr
raw(ICMPv6NDOptRedirectedHdr(len=0xff, res=0x1111, pkt="somestringthatisnotanipv6packet")) == b'\x04\xff4369\x00\x00somestringthatisnotanipv'
raw(ICMPv6NDOptRedirectedHdr(len=0xff, res="abcdef", pkt="somestringthatisnotanipv6packet")) == b'\x04\xffabcdefsomestringthatisnotanipv'
= ICMPv6NDOptRedirectedHdr - Instantiation with simple IPv6 packet (no upper layer)
~ ICMPv6NDOptRedirectedHdr
......
#! /bin/sh
DIR=$(dirname $0)/..
if python --version 2>&1 | grep -q '^Python 2'; then
PYTHON=python
else
PYTHON=python2
fi
PYTHON=${PYTHON:-python}
if [ -z "$*" ]
then
PYTHONPATH=$DIR exec $PYTHON ${DIR}/scapy/tools/UTscapy.py -t regression.uts -f html -K ipv6 -l -o /tmp/scapy_regression_test_$(date +%Y%m%d-%H%M%S).html
......
#! /bin/sh
DIR=$(dirname $0)/..
PYTHON=python3
if [ -z "$*" ]
then
PYTHONPATH=$DIR exec $PYTHON ${DIR}/scapy/tools/UTscapy.py -t regression.uts -f html -K ipv6 -l -o /tmp/scapy_regression_test_$(date +%Y%m%d-%H%M%S).html
else
PYTHONPATH=$DIR exec $PYTHON ${DIR}/scapy/tools/UTscapy.py "$@"
fi
#! /bin/sh
PYTHON=python2
source $(dirname $0)/run_tests "$@"
#! /bin/sh
PYTHON=python3
source $(dirname $0)/run_tests "$@"
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