1environment: 2 3 # Python versions that will be tested 4 # Note: it defines variables that can be used later 5 matrix: 6 - PYTHON: "C:\\Python27-x64" 7 PYTHON_VERSION: "2.7.x" 8 PYTHON_ARCH: "64" 9 - PYTHON: "C:\\Python36-x64" 10 PYTHON_VERSION: "3.6.x" 11 PYTHON_ARCH: "64" 12 13# There is no build phase for Scapy 14build: off 15 16install: 17 # Install the npcap, windump and wireshark suites 18 - ps: .\.appveyor\InstallNpcap.ps1 19 - ps: .\.appveyor\InstallWindump.ps1 20 - choco install -y wireshark 21 # Install Python modules 22 - "%PYTHON%\\python -m pip install cryptography coverage mock" 23 - set PATH="%PYTHON%\\Scripts\\;%PATH%" 24 25test_script: 26 # Set environment variables 27 - set PYTHONPATH=%APPVEYOR_BUILD_FOLDER% 28 - set PATH="%APPVEYOR_BUILD_FOLDER%;C:\Program Files\Wireshark\;%PATH%" 29 30 # Disable open_ssl client tests 31 - set ARGS=-K open_ssl_client 32 # Disable broken Python 3 tests if Python3 is detected 33 - if not x%PYTHON:3=%==x%PYTHON% set ARGS=%ARGS% -K FIXME_py3 34 35 # Main unit tests 36 - "%PYTHON%\\python -m coverage run --parallel-mode bin\\UTscapy -f text -t test\\regression.uts -F -K mock_read_routes6_bsd -K ipv6 || exit /b 42" 37 - 'del test\regression.uts' 38 39 # Secondary and contrib unit tests 40 - 'del test\bpf.uts test\linux.uts test\sendsniff.uts' # Don't bother with OS dependent regression tests 41 - "%PYTHON%\\python -m coverage run --parallel-mode bin\\UTscapy -c test\\configs\\windows.utsc %ARGS% || exit /b 42" 42 43 # TLS unit tests 44 # Note: due to a multiprocessing bug, we got to be in the UTscapy.py folder and call it directly 45 - 'cd scapy/tools' 46 - "%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" 47 - 'cd ../../' 48 49after_test: 50 # Install & run codecov 51 - "%PYTHON%\\python -m pip install codecov" 52 - "SET PATH=%PYTHON%\\Scripts\\;%PATH%" 53 - "coverage combine ./" 54 - codecov 55