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" |
| 9 | |
| 10 | # There is no build phase for Scapy |
| 11 | build: off |
| 12 | |
| 13 | install: |
gpotter2 | d302b8f | 2017-02-23 20:22:26 +0100 | [diff] [blame] | 14 | # Install the npcap, windump and wireshark suites |
gpotter2 | f3b7e4b | 2017-05-31 21:08:59 +0200 | [diff] [blame] | 15 | - ps: .\.appveyor\InstallNpcap.ps1 |
gpotter2 | d302b8f | 2017-02-23 20:22:26 +0100 | [diff] [blame] | 16 | - ps: .\.appveyor\InstallWindump.ps1 |
gpotter2 | f3b7e4b | 2017-05-31 21:08:59 +0200 | [diff] [blame] | 17 | - choco install -y wireshark |
Guillaume Valadon | 58fdc06 | 2016-12-14 17:26:38 +0100 | [diff] [blame] | 18 | # Install Python modules |
gpotter2 | 3b36b63 | 2017-02-27 20:20:02 +0100 | [diff] [blame] | 19 | - "%PYTHON%\\python -m pip install cryptography coverage mock pyreadline" |
gpotter2 | 0c9b908 | 2017-01-22 16:51:46 +0100 | [diff] [blame] | 20 | - set PATH="%PYTHON%\\Scripts\\;%PATH%" |
Guillaume Valadon | 58fdc06 | 2016-12-14 17:26:38 +0100 | [diff] [blame] | 21 | |
| 22 | test_script: |
| 23 | # Set environment variables |
| 24 | - set PYTHONPATH=%APPVEYOR_BUILD_FOLDER% |
Pierre LALET | 598bdae | 2016-12-23 17:13:22 +0100 | [diff] [blame] | 25 | - set PATH="%APPVEYOR_BUILD_FOLDER%;C:\Program Files\Wireshark\;%PATH%" |
Guillaume Valadon | 58fdc06 | 2016-12-14 17:26:38 +0100 | [diff] [blame] | 26 | |
| 27 | # Main unit tests |
gpotter2 | 653d114 | 2017-06-22 10:19:02 +0200 | [diff] [blame] | 28 | - "%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] | 29 | - 'del test\regression.uts' |
| 30 | |
gpotter2 | f2201b7 | 2017-03-05 01:51:00 +0100 | [diff] [blame] | 31 | # Secondary and contrib unit tests |
Pierre LALET | 8850035 | 2017-08-27 03:49:13 +0200 | [diff] [blame^] | 32 | - 'del test\bpf.uts test\linux.uts test\sendsniff.uts' # Don't bother with OS dependent regression tests |
gpotter2 | bc283f0 | 2017-02-26 14:35:06 +0100 | [diff] [blame] | 33 | - "%PYTHON%\\python -m coverage run --parallel-mode bin\\UTscapy -c test\\configs\\windows.utsc || exit /b 42" |
| 34 | |
gpotter2 | 911f1d6 | 2017-02-26 21:24:40 +0100 | [diff] [blame] | 35 | # TLS unit tests |
gpotter2 | bc283f0 | 2017-02-26 14:35:06 +0100 | [diff] [blame] | 36 | # 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 Valadon | 2ed4769 | 2017-01-05 10:27:57 +0100 | [diff] [blame] | 40 | |
| 41 | after_test: |
| 42 | # Install & run codecov |
| 43 | - "%PYTHON%\\python -m pip install codecov" |
| 44 | - "SET PATH=%PYTHON%\\Scripts\\;%PATH%" |
Guillaume Valadon | 1859e86 | 2017-04-12 13:16:50 +0200 | [diff] [blame] | 45 | - "coverage combine ./" |
Guillaume Valadon | 2ed4769 | 2017-01-05 10:27:57 +0100 | [diff] [blame] | 46 | - codecov |