travis: enable capture tests on Linux and macOS

Windows is excluded because installing Npcap is potentially difficult.
On macOS use ChmodBPF to create more than 4 bpf devices. This fixes
timeout issues in the case_wireshark_capture test due to an error dialog
about permissions.

Change-Id: I4cfd9618df96a3d6ae4bb2ce0229e9c2c3cccaed
Reviewed-on: https://code.wireshark.org/review/31683
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
Peter Wu 2019-01-22 19:50:12 +01:00
parent cbb5b78a7d
commit 9175a235a8
1 changed files with 2 additions and 0 deletions

View File

@ -83,6 +83,7 @@ before_install:
# macos
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./tools/macos-setup-brew.sh; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install softhsm; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then sed s/access_bpf/staff/ packaging/macosx/ChmodBPF/ChmodBPF | sudo bash; fi
# linux
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ./tools/debian-setup.sh --install-optional --install-test-deps -q; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -y python3-pip; fi
@ -128,6 +129,7 @@ script:
- cmake --build . --config RelWithDebInfo
- cmake --build . --config RelWithDebInfo --target test-programs
- if [ "$PCAP" = "OFF" ]; then export PYTEST_ADDOPTS=--skip-missing-programs=dumpcap,rawshark; fi
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$PCAP" = "ON" ]; then sudo setcap "CAP_NET_RAW+eip CAP_NET_ADMIN+eip" run/dumpcap; fi
- pytest
after_script:
- if [ -f run/tshark ]; then run/tshark --version; fi