blob: 5f7f0fc703473bdf17874f23f4bae8482ff8f332 [file] [log] [blame]
Guillaume Valadon58fdc062016-12-14 17:26:38 +01001environment:
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"
gpotter2b29b8a42018-01-09 18:00:56 +01009 - PYTHON: "C:\\Python36-x64"
10 PYTHON_VERSION: "3.6.x"
11 PYTHON_ARCH: "64"
Guillaume Valadon58fdc062016-12-14 17:26:38 +010012
13# There is no build phase for Scapy
14build: off
15
16install:
gpotter2d302b8f2017-02-23 20:22:26 +010017 # Install the npcap, windump and wireshark suites
gpotter2f3b7e4b2017-05-31 21:08:59 +020018 - ps: .\.appveyor\InstallNpcap.ps1
gpotter2d302b8f2017-02-23 20:22:26 +010019 - ps: .\.appveyor\InstallWindump.ps1
gpotter2f3b7e4b2017-05-31 21:08:59 +020020 - choco install -y wireshark
Guillaume Valadon58fdc062016-12-14 17:26:38 +010021 # Install Python modules
gpotter2887a9672017-09-20 11:29:50 +020022 - "%PYTHON%\\python -m pip install cryptography coverage mock"
gpotter20c9b9082017-01-22 16:51:46 +010023 - set PATH="%PYTHON%\\Scripts\\;%PATH%"
Guillaume Valadon58fdc062016-12-14 17:26:38 +010024
25test_script:
26 # Set environment variables
27 - set PYTHONPATH=%APPVEYOR_BUILD_FOLDER%
Pierre LALET598bdae2016-12-23 17:13:22 +010028 - set PATH="%APPVEYOR_BUILD_FOLDER%;C:\Program Files\Wireshark\;%PATH%"
gpotter229f54ee2018-01-09 19:59:29 +010029
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
Guillaume Valadon58fdc062016-12-14 17:26:38 +010034
35 # Main unit tests
gpotter2653d1142017-06-22 10:19:02 +020036 - "%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"
Guillaume Valadon58fdc062016-12-14 17:26:38 +010037 - 'del test\regression.uts'
38
gpotter2f2201b72017-03-05 01:51:00 +010039 # Secondary and contrib unit tests
Pierre LALET88500352017-08-27 03:49:13 +020040 - 'del test\bpf.uts test\linux.uts test\sendsniff.uts' # Don't bother with OS dependent regression tests
gpotter229f54ee2018-01-09 19:59:29 +010041 - "%PYTHON%\\python -m coverage run --parallel-mode bin\\UTscapy -c test\\configs\\windows.utsc %ARGS% || exit /b 42"
gpotter2bc283f02017-02-26 14:35:06 +010042
gpotter2911f1d62017-02-26 21:24:40 +010043 # TLS unit tests
gpotter2bc283f02017-02-26 14:35:06 +010044 # Note: due to a multiprocessing bug, we got to be in the UTscapy.py folder and call it directly
45 - 'cd scapy/tools'
gpotter229f54ee2018-01-09 19:59:29 +010046 - "%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"
gpotter2bc283f02017-02-26 14:35:06 +010047 - 'cd ../../'
Guillaume Valadon2ed47692017-01-05 10:27:57 +010048
49after_test:
50 # Install & run codecov
51 - "%PYTHON%\\python -m pip install codecov"
52 - "SET PATH=%PYTHON%\\Scripts\\;%PATH%"
Guillaume Valadon1859e862017-04-12 13:16:50 +020053 - "coverage combine ./"
Guillaume Valadon2ed47692017-01-05 10:27:57 +010054 - codecov