blob: ffa3c7a8a54c21c928a6ac034ed7be06f8ed32ab [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"
9
10# There is no build phase for Scapy
11build: off
12
13install:
gpotter2d302b8f2017-02-23 20:22:26 +010014 # Install the npcap, windump and wireshark suites
gpotter2f3b7e4b2017-05-31 21:08:59 +020015 - ps: .\.appveyor\InstallNpcap.ps1
gpotter2d302b8f2017-02-23 20:22:26 +010016 - ps: .\.appveyor\InstallWindump.ps1
gpotter2f3b7e4b2017-05-31 21:08:59 +020017 - choco install -y wireshark
Guillaume Valadon58fdc062016-12-14 17:26:38 +010018 # Install Python modules
gpotter23b36b632017-02-27 20:20:02 +010019 - "%PYTHON%\\python -m pip install cryptography coverage mock pyreadline"
gpotter20c9b9082017-01-22 16:51:46 +010020 - set PATH="%PYTHON%\\Scripts\\;%PATH%"
Guillaume Valadon58fdc062016-12-14 17:26:38 +010021
22test_script:
23 # Set environment variables
24 - set PYTHONPATH=%APPVEYOR_BUILD_FOLDER%
Pierre LALET598bdae2016-12-23 17:13:22 +010025 - set PATH="%APPVEYOR_BUILD_FOLDER%;C:\Program Files\Wireshark\;%PATH%"
Guillaume Valadon58fdc062016-12-14 17:26:38 +010026
27 # Main unit tests
gpotter2653d1142017-06-22 10:19:02 +020028 - "%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 +010029 - 'del test\regression.uts'
30
gpotter2f2201b72017-03-05 01:51:00 +010031 # Secondary and contrib unit tests
Pierre LALET88500352017-08-27 03:49:13 +020032 - 'del test\bpf.uts test\linux.uts test\sendsniff.uts' # Don't bother with OS dependent regression tests
gpotter2bc283f02017-02-26 14:35:06 +010033 - "%PYTHON%\\python -m coverage run --parallel-mode bin\\UTscapy -c test\\configs\\windows.utsc || exit /b 42"
34
gpotter2911f1d62017-02-26 21:24:40 +010035 # TLS unit tests
gpotter2bc283f02017-02-26 14:35:06 +010036 # Note: due to a multiprocessing bug, we got to be in the UTscapy.py folder and call it directly
37 - 'cd scapy/tools'
38 - "%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'))\" -K open_ssl_client || exit /b 42"
39 - 'cd ../../'
Guillaume Valadon2ed47692017-01-05 10:27:57 +010040
41after_test:
42 # Install & run codecov
43 - "%PYTHON%\\python -m pip install codecov"
44 - "SET PATH=%PYTHON%\\Scripts\\;%PATH%"
Guillaume Valadon1859e862017-04-12 13:16:50 +020045 - "coverage combine ./"
Guillaume Valadon2ed47692017-01-05 10:27:57 +010046 - codecov