2016-12-14 16:26:38 +00:00
|
|
|
environment:
|
2018-04-10 16:38:51 +00:00
|
|
|
# This key is encrypted using secdev's appveyor private key,
|
|
|
|
# dissected only on master builds (not PRs) and is used during
|
|
|
|
# npcap OEM installation
|
|
|
|
npcap_oem_key:
|
|
|
|
secure: d120KTZBsVnzZ+pFPLPEOTOkyJxTVRjhbDJn9L+RYnM=
|
2016-12-14 16:26:38 +00:00
|
|
|
# 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"
|
2018-01-09 17:00:56 +00:00
|
|
|
- PYTHON: "C:\\Python36-x64"
|
|
|
|
PYTHON_VERSION: "3.6.x"
|
|
|
|
PYTHON_ARCH: "64"
|
2016-12-14 16:26:38 +00:00
|
|
|
|
|
|
|
# There is no build phase for Scapy
|
|
|
|
build: off
|
|
|
|
|
|
|
|
install:
|
2017-02-23 19:22:26 +00:00
|
|
|
# Install the npcap, windump and wireshark suites
|
2017-05-31 19:08:59 +00:00
|
|
|
- ps: .\.appveyor\InstallNpcap.ps1
|
2017-02-23 19:22:26 +00:00
|
|
|
- ps: .\.appveyor\InstallWindump.ps1
|
2017-05-31 19:08:59 +00:00
|
|
|
- choco install -y wireshark
|
2016-12-14 16:26:38 +00:00
|
|
|
# Install Python modules
|
2017-09-20 09:29:50 +00:00
|
|
|
- "%PYTHON%\\python -m pip install cryptography coverage mock"
|
2017-01-22 15:51:46 +00:00
|
|
|
- set PATH="%PYTHON%\\Scripts\\;%PATH%"
|
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%"
|
2018-01-09 18:59:29 +00:00
|
|
|
|
|
|
|
# Disable open_ssl client tests
|
|
|
|
- set ARGS=-K open_ssl_client
|
|
|
|
# Disable broken Python 3 tests if Python3 is detected
|
|
|
|
- if not x%PYTHON:3=%==x%PYTHON% set ARGS=%ARGS% -K FIXME_py3
|
2016-12-14 16:26:38 +00:00
|
|
|
|
|
|
|
# Main unit tests
|
2018-04-03 17:32:21 +00:00
|
|
|
- "%PYTHON%\\python -m coverage run --parallel-mode bin\\UTscapy -f text -t test\\regression.uts -F -K mock_read_routes_bsd -K ipv6 || exit /b 42"
|
2016-12-14 16:26:38 +00:00
|
|
|
- 'del test\regression.uts'
|
|
|
|
|
2017-03-05 00:51:00 +00:00
|
|
|
# Secondary and contrib unit tests
|
2017-08-27 01:49:13 +00:00
|
|
|
- 'del test\bpf.uts test\linux.uts test\sendsniff.uts' # Don't bother with OS dependent regression tests
|
2018-01-09 18:59:29 +00:00
|
|
|
- "%PYTHON%\\python -m coverage run --parallel-mode bin\\UTscapy -c test\\configs\\windows.utsc %ARGS% || exit /b 42"
|
2017-02-26 13:35:06 +00:00
|
|
|
|
2017-02-26 20:24:40 +00:00
|
|
|
# TLS unit tests
|
2017-02-26 13:35:06 +00:00
|
|
|
# Note: due to a multiprocessing bug, we got to be in the UTscapy.py folder and call it directly
|
|
|
|
- 'cd scapy/tools'
|
2018-01-09 18:59:29 +00:00
|
|
|
- "%PYTHON%\\python -m coverage run --concurrency=multiprocessing UTscapy.py -f text -t ..\\..\\test\\tls\\tests_tls_netaccess.uts -F -P \"sys.path.append(os.path.abspath('../../test/tls'))\" %ARGS% || exit /b 42"
|
2017-02-26 13:35:06 +00:00
|
|
|
- 'cd ../../'
|
2017-01-05 09:27:57 +00:00
|
|
|
|
|
|
|
after_test:
|
|
|
|
# Install & run codecov
|
|
|
|
- "%PYTHON%\\python -m pip install codecov"
|
|
|
|
- "SET PATH=%PYTHON%\\Scripts\\;%PATH%"
|
2017-04-12 11:16:50 +00:00
|
|
|
- "coverage combine ./"
|
2017-01-05 09:27:57 +00:00
|
|
|
- codecov
|