From 9175a235a8d8b77a9734b757274129ef0f3d3e84 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Tue, 22 Jan 2019 19:50:12 +0100 Subject: [PATCH] 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 --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index f1535ba8e2..7e0084fcc2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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