Guillaume Valadon | 58fdc06 | 2016-12-14 17:26:38 +0100 | [diff] [blame] | 1 | environment: |
| 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" |
gpotter2 | b29b8a4 | 2018-01-09 18:00:56 +0100 | [diff] [blame] | 9 | - PYTHON: "C:\\Python36-x64" |
| 10 | PYTHON_VERSION: "3.6.x" |
| 11 | PYTHON_ARCH: "64" |
Guillaume Valadon | 58fdc06 | 2016-12-14 17:26:38 +0100 | [diff] [blame] | 12 | |
| 13 | # There is no build phase for Scapy |
| 14 | build: off |
| 15 | |
| 16 | install: |
gpotter2 | d302b8f | 2017-02-23 20:22:26 +0100 | [diff] [blame] | 17 | # Install the npcap, windump and wireshark suites |
gpotter2 | f3b7e4b | 2017-05-31 21:08:59 +0200 | [diff] [blame] | 18 | - ps: .\.appveyor\InstallNpcap.ps1 |
gpotter2 | d302b8f | 2017-02-23 20:22:26 +0100 | [diff] [blame] | 19 | - ps: .\.appveyor\InstallWindump.ps1 |
gpotter2 | f3b7e4b | 2017-05-31 21:08:59 +0200 | [diff] [blame] | 20 | - choco install -y wireshark |
Guillaume Valadon | 58fdc06 | 2016-12-14 17:26:38 +0100 | [diff] [blame] | 21 | # Install Python modules |
gpotter2 | 887a967 | 2017-09-20 11:29:50 +0200 | [diff] [blame] | 22 | - "%PYTHON%\\python -m pip install cryptography coverage mock" |
gpotter2 | 0c9b908 | 2017-01-22 16:51:46 +0100 | [diff] [blame] | 23 | - set PATH="%PYTHON%\\Scripts\\;%PATH%" |
Guillaume Valadon | 58fdc06 | 2016-12-14 17:26:38 +0100 | [diff] [blame] | 24 | |
| 25 | test_script: |
| 26 | # Set environment variables |
| 27 | - set PYTHONPATH=%APPVEYOR_BUILD_FOLDER% |
Pierre LALET | 598bdae | 2016-12-23 17:13:22 +0100 | [diff] [blame] | 28 | - set PATH="%APPVEYOR_BUILD_FOLDER%;C:\Program Files\Wireshark\;%PATH%" |
gpotter2 | 29f54ee | 2018-01-09 19:59:29 +0100 | [diff] [blame] | 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 |
Guillaume Valadon | 58fdc06 | 2016-12-14 17:26:38 +0100 | [diff] [blame] | 34 | |
| 35 | # Main unit tests |
gpotter2 | 653d114 | 2017-06-22 10:19:02 +0200 | [diff] [blame] | 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" |
Guillaume Valadon | 58fdc06 | 2016-12-14 17:26:38 +0100 | [diff] [blame] | 37 | - 'del test\regression.uts' |
| 38 | |
gpotter2 | f2201b7 | 2017-03-05 01:51:00 +0100 | [diff] [blame] | 39 | # Secondary and contrib unit tests |
Pierre LALET | 8850035 | 2017-08-27 03:49:13 +0200 | [diff] [blame] | 40 | - 'del test\bpf.uts test\linux.uts test\sendsniff.uts' # Don't bother with OS dependent regression tests |
gpotter2 | 29f54ee | 2018-01-09 19:59:29 +0100 | [diff] [blame] | 41 | - "%PYTHON%\\python -m coverage run --parallel-mode bin\\UTscapy -c test\\configs\\windows.utsc %ARGS% || exit /b 42" |
gpotter2 | bc283f0 | 2017-02-26 14:35:06 +0100 | [diff] [blame] | 42 | |
gpotter2 | 911f1d6 | 2017-02-26 21:24:40 +0100 | [diff] [blame] | 43 | # TLS unit tests |
gpotter2 | bc283f0 | 2017-02-26 14:35:06 +0100 | [diff] [blame] | 44 | # Note: due to a multiprocessing bug, we got to be in the UTscapy.py folder and call it directly |
| 45 | - 'cd scapy/tools' |
gpotter2 | 29f54ee | 2018-01-09 19:59:29 +0100 | [diff] [blame] | 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" |
gpotter2 | bc283f0 | 2017-02-26 14:35:06 +0100 | [diff] [blame] | 47 | - 'cd ../../' |
Guillaume Valadon | 2ed4769 | 2017-01-05 10:27:57 +0100 | [diff] [blame] | 48 | |
| 49 | after_test: |
| 50 | # Install & run codecov |
| 51 | - "%PYTHON%\\python -m pip install codecov" |
| 52 | - "SET PATH=%PYTHON%\\Scripts\\;%PATH%" |
Guillaume Valadon | 1859e86 | 2017-04-12 13:16:50 +0200 | [diff] [blame] | 53 | - "coverage combine ./" |
Guillaume Valadon | 2ed4769 | 2017-01-05 10:27:57 +0100 | [diff] [blame] | 54 | - codecov |