2016-12-14 16:26:38 +00:00
environment :
# Python versions that will be tested
# Note: it defines variables that can be used later
matrix :
- PYTHON : "C:\\Python27-x64"
PYTHON_VERSION : "2.7.x"
PYTHON_ARCH : "64"
# There is no build phase for Scapy
build : off
install :
# Installing WinPcap directly does not work,
# see http://help.appveyor.com/discussions/problems/2280-winpcap-installation-issue
2016-12-20 06:46:27 +00:00
# - choco install -y nmap
2016-12-23 16:13:22 +00:00
- choco install -y winpcap wireshark
2016-12-20 06:46:27 +00:00
- ps : wget http://www.winpcap.org/windump/install/bin/windump_3_9_5/WinDump.exe -UseBasicParsing -OutFile C:\Windows\System32\windump.exe
2016-12-14 16:26:38 +00:00
- refreshenv
# Install Python modules
2017-01-15 17:32:00 +00:00
- "%PYTHON%\\python -m pip install ecdsa cryptography coverage mock pyreadline keyboard"
2016-12-14 16:26:38 +00:00
test_script :
# Set environment variables
- set PYTHONPATH=%APPVEYOR_BUILD_FOLDER%
2016-12-23 16:13:22 +00:00
- set PATH="%APPVEYOR_BUILD_FOLDER%;C:\Program Files\Wireshark\;%PATH%"
2016-12-14 16:26:38 +00:00
# Main unit tests
2017-01-05 09:27:57 +00:00
- "%PYTHON%\\python -m coverage run -a bin\\UTscapy -f text -t test\\regression.uts -F -K automaton -K mock_read_routes6_bsd || exit /b 42"
2016-12-14 16:26:38 +00:00
- 'del test\regression.uts'
# Secondary unit tests
- 'del test\bpf.uts' # Don't bother with BPF regression tests
2017-01-05 09:27:57 +00:00
- "for %%t in (test\\*.uts) do (%PYTHON%\\python -m coverage run -a bin\\UTscapy -f text -t %%t -F -K combined_modes || exit /b 42)"
2016-12-14 16:26:38 +00:00
# Contrib unit tests
2017-01-05 09:27:57 +00:00
- "for %%t in (scapy\\contrib\\*.uts) do (%PYTHON%\\python -m coverage run -a bin\\UTscapy -f text -t %%t -F -P \"load_contrib(\'%%~nt\')\" || exit /b 42)"
after_test :
# Install & run codecov
- "%PYTHON%\\python -m pip install codecov"
- "SET PATH=%PYTHON%\\Scripts\\;%PATH%"
- codecov