Commit Graph

66 Commits

Author SHA1 Message Date
Gerald Combs 313a6e9274 CI: Don't run xcode-select.
Changing the developer directory shouldn't be necessary after the include
path fixups in 270c8ed746.
2021-02-18 13:54:47 +00:00
Dario Lombardo 8dcff0e1f5 travis: bump macOS image version.
Fix: #17080.
2020-12-28 17:42:13 +00:00
Dario Lombardo 778c708965 travis: allow ppc64le builds fail.
Bug: 16544
Change-Id: I12be3ae11575f80b3679f4cc185661ad026fabaf
Reviewed-by: Peter Wu <>
2020-05-02 22:31:00 +00:00
Peter Wu 6341185a49 travis: skip tests when the build fails
If the build fails, most tests will fail due to lack of tshark.
Terminate early to avoid this. The "before_install" and "before_script"
stages exit immediately with the first failing command, but "script" and
"after_script" stages do not. This is due to "assert: false" in [1].
Explicitly call [2] to achieve the same exit-on-failure behavior.


Remove unnecessary "cd" while at it, it only existed to workaround a bug
with the cache directory on Windows.

Change-Id: Iabdffc26d55bd5c08d27e400a67657d5e69a5c60
Reviewed-by: Dario Lombardo <>
Reviewed-by: Peter Wu <>
2020-05-02 17:04:52 +00:00
Dario Lombardo 3485ad6d1c travis: fix macOS build.
Use the toolchain included with Command Line Tools instead of the one
from This fixes the build on macOS 10.14.6:

    FAILED: epan/crypt/CMakeFiles/crypt.dir/dot11decrypt_tkip.c.o
    /Applications/ ...
    /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/_stdio.h:93:16: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness]
            unsigned char   *_base;

Change-Id: I45d80dce1a0aca7a9f6a945171ebd8789314e924
Reviewed-by: Peter Wu <>
Reviewed-by: Dario Lombardo <>
2020-04-25 21:08:25 +00:00
Peter Wu 44407c16fc travis: remove Windows support
The Windows builds have been stuck for a while because the Qt project
changed their installers which prevented the installers from finishing.
Remove support because 1) the Qt installer will most likely continue to
break over time as it did in the past, several times, 2) Travis CI uses
Bash which is a non-standard environment on Windows, and 3) other CI
platforms such as GitHub Actions started providing Windows support.

Remove Windows from the Travis CI builds and all related supporting
files as well. They can be restored once the Qt automation is fixed.

Bug: 16501
Change-Id: I911491587a23f339aa6d6ffcfb6faffe234e5e91
Petri-Dish: Peter Wu <>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <>
Reviewed-by: Dario Lombardo <>
2020-04-19 17:47:29 +00:00
Dario Lombardo 77b0dc6931 gitlab/travis: remove nopcap tests.
Lack of capture support is such a rare case, it is not worth spending
too much CI cycles testing it for every build.

Change-Id: Ia9be2b6ba21d0b198e65d746483282ef66cadb84
Reviewed-by: Dario Lombardo <>
Reviewed-by: Peter Wu <>
2020-03-29 20:36:32 +00:00
Peter Wu 1716352f6f travis: remove redundant jobs, update to xcode11.3
* Remove amd64+gcc-8 NOPCAP in favor of the faster clang NOPCAP. GitLab
  CI builds showed that both builds would catch the same issues.
* Remove NOPCAP macOS, it is very uncommon so do not waste cycles on it.
* Remove amd64+gcc-8 as amd64+gcc-9 covers the same plus more.
* Remove unnecessary PPA, gcc-8 is included with bionic by default.
* Remove Xcode10.3 build to save resources.
* Update Xcode11.2 to the latest Xcode11.3, no compiler changes.

Change-Id: Iddaa20b865fe16380844f266fc68d394f979a14c
Petri-Dish: Alexis La Goutte <>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <>
2020-03-18 22:39:57 +00:00
Dario Lombardo f1a49e55b1 travis: add gcc-9 builds.
Ping-Bug: 16319
Change-Id: I255355cc2d9173cbb4c6afc11f38f7c173a55872
Reviewed-by: Alexis La Goutte <>
2020-01-11 07:53:49 +00:00
Dario Lombardo c938841469 travis: add arch name to linux builds.
Change-Id: Ib39b366069fb8e0104368bc23cfe2263553fb9f4
Reviewed-by: Alexis La Goutte <>
Reviewed-by: Anders Broman <>
2019-11-14 08:23:39 +00:00
Dario Lombardo 12969c22ba travis: change linux distribution to bionic.
Change-Id: I4d0278dbe6ecd8ced3c0edd2afb55f7dedb82d58
Reviewed-by: Anders Broman <>
2019-11-14 08:23:21 +00:00
Dario Lombardo 06a34129c2 travis: add ppc64le builds.
Change-Id: I4c85084bb4e54c521889d4549718ea5ecf24481b
Reviewed-by: Anders Broman <>
2019-11-14 08:23:07 +00:00
Dario Lombardo 83fa374002 travis: add s390x builds.
Change-Id: Ib5460beffd185c5d5126302001701125955b973e
Reviewed-by: Anders Broman <>
2019-11-14 08:22:00 +00:00
Dario Lombardo d20f13bbcd travis: fix clang version name in xcode builds.
Change-Id: I9475fc9889c2a988ed8a7541471bb7912ace1643
Reviewed-by: Dario Lombardo <>
2019-11-13 13:28:44 +00:00
Dario Lombardo bf5d699cf0 travis: bump xcode versions.
Build with 10.3 and 11.2.
Clang versions found here:

Change-Id: I3d339e92d1859be3b28e1bbf91a65c2e4c743efa
Reviewed-by: Anders Broman <>
2019-11-08 07:37:31 +00:00
Vasil Velichkov b56b6f6a8f travis: Add Linux arm64 builds
Test with both gcc-8 and clang

Change-Id: I3a04bbc93f71c570d1004c5df224bfe098a54452
Reviewed-by: Alexis La Goutte <>
Reviewed-by: Dario Lombardo <>
Reviewed-by: Peter Wu <>
2019-11-07 10:54:03 +00:00
Peter Wu 1a48b22686 travis: fix compatibility with CMake 3.15
Since CMake 3.15.0, CMAKE_BUILD_PARALLEL_LEVEL=0 is rejected. Set an
empty value to achieve the desired behavior (enabling parallelism).

Change-Id: I6d32bc7286d32c2f2a3605b42ef82e28342da440
Reviewed-by: Peter Wu <>
2019-10-02 21:49:36 +00:00
Peter Wu be9c1ec35c Revert "travis: add -e to ci script."
This reverts commit 5d0fec3363.

"set -e" breaks all macOS builds after completing the script block.

Change-Id: I5c297fd4b1b816d3143fa8fd8a51eb848c7c2de4
Reviewed-by: Peter Wu <>
2019-06-18 02:06:34 +00:00
Dario Lombardo 5d0fec3363 travis: add -e to ci script.
This will stop if the build fails as soon as one command fails.
This prevents for instance to run the tests if one executable
failed to compile.

A long discussion is still in place and this looks like the quickest

Change-Id: Ifa630bc37b43b4ee9693cebdbb5b8a6ddf127aad
Reviewed-by: Anders Broman <>
2019-06-16 03:06:19 +00:00
Dario Lombardo bb00f37f51 gitlab-ci: run setcap on dumpcap.
This enables capture privileges for 'user' that is used in the tests.
travis.yml has been changed as well to reflect the setcap command in
the docs.

Change-Id: I0584e0df417112b1774b86ef8b28121799efe137
Reviewed-by: Peter Wu <>
2019-05-16 20:29:59 +00:00
Peter Wu e60c14e376 travis: update to Qt 5.12.3 to fix Windows builds
The Qt installer always seems to install the latest version while the
version was assumed to be fixed. This configuration will likely break
again with the next Qt update, but it fixes the current Windows builds.

Change-Id: Icf4a8fdf10c15e6f6a6eb0451ff30662da613567
Reviewed-by: Dario Lombardo <>
Reviewed-by: Peter Wu <>
2019-04-19 17:30:04 +00:00
Peter Wu 8a283325d4 travis: fix missing msbuild output on Windows
For some reason the CMake output to Python is missing, no matter how
hard I try. Use an alternative approach instead where Python executes
CMake and filters the output without relying on pipes in Bash.

Change-Id: I21b8b709c3a944fbd3b07e7fac59702735dd83a4
Reviewed-by: Peter Wu <>
Reviewed-by: Dario Lombardo <>
2019-03-31 20:54:21 +00:00
Peter Wu 4118ba3af1 travis: Allow Windows builds to fail
Travis CI builds for Windows are still experimental with no sign of
improvement for caching, pre-installed packages and other issues. Allow
it to fail such that Linux/macOS builds determine the build result.

Change-Id: I146e829bd89ab4f0e7bc9e1f1b89803c2294b75d
Reviewed-by: Dario Lombardo <>
2019-03-24 20:22:13 +00:00
Peter Wu e6904308d3 travis: fold msbuild output to remain below the 10k line limit
Fold messages by overwriting the same line via a carriage return),
similar to Ninja. The full log will still contain all messages.

Change-Id: I89cc7d10147ebd21f22d40c8d2c4481b1dd2ab56
Reviewed-by: Dario Lombardo <>
Reviewed-by: Alexis La Goutte <>
Reviewed-by: Peter Wu <>
2019-02-15 10:02:01 +00:00
Peter Wu 45f55ad8ac travis: improve cache handling on Windows
The Travis casher Bash implementation for Windows has bugs. The
workarounds only slow down the build further. Given the lack of feedback
on the casher bugs from Travis CI, let's try to improve it. Hopefully
this will avoid stalls during the cache step.

The "cd .." and "cd build" hack is required due to an annoying bug:

Change-Id: Iae62aa7e9ef78815d240b91199acfe21549c1af7
Reviewed-by: Dario Lombardo <>
Reviewed-by: Alexis La Goutte <>
Reviewed-by: Peter Wu <>
2019-02-15 10:01:55 +00:00
Peter Wu 0c00b1666f travis: avoid aborting the build on slow Qt installations
Periodically report the installation status to avoid aborting the
installation on slow Qt installations (possibly due to slow network?).

Change-Id: I6b8b8db49f2268d557a5ca2e7b1f08b6ea801fd9
Reviewed-by: Dario Lombardo <>
Reviewed-by: Alexis La Goutte <>
Reviewed-by: Peter Wu <>
2019-02-15 10:01:50 +00:00
Peter Wu 9175a235a8 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-by: Peter Wu <>
2019-01-24 00:26:28 +00:00
Peter Wu cbb5b78a7d test,travis: dump a screenshot for hanging GUI tests
For some reason the wireshark GUI tests hang on the Travis OS X builds,
but I could not reproduce it locally. It turns out than an error dialog
was present, but I could not know that without the screenshot.

Change-Id: Idf897d33b4fddf3c19c69ebcea60b629f1ca9368
Petri-Dish: Peter Wu <>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <>
2019-01-24 00:26:22 +00:00
Peter Wu 0971d20452 test: fail tests when programs are missing
Building only a subset of programs is not a very common situation, it is
more likely that some feature was accidentally disabled. For that
reason, fail tests by default unless a program is explicitly permitted
to be missing.

The '-v' test is now dropped from the Travis tests, the sole reason of
adding it was to see which tests got (accidentally) skipped.

Change-Id: I725f4508541d8ed980e17d69fb7aee1ad2875d73
Petri-Dish: Peter Wu <>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <>
2019-01-21 16:46:17 +00:00
Peter Wu 5ed8360c21 travis: initial Windows support with non-interactive Qt installer
The current preview release of Windows support on Travis lacks many
packages (like Qt and Python 3) and is very much tied to git-bash
(unlike AppVeyor which has a more native Windows experience).

Several workarounds were necessary, such as reimplementing refreshenv,
setting CMAKE_PROGRAM_PATH) and setting a supported language. See also

I wrote the Qt installer script originally for Qt 5.6, ported it to Qt
5.9.5 and finally updated it for 5.12, some comments could be outdated.

Duration as measured for one x64 build:
- 3m00s - restore cache (Qt and wireshark-libs)
- 2m22s - choco install
- 0m8s - pip install
- 2m20s - cmake
- 18m5s - build all
- 0m20s - build test-programs
- 5m34s - pytest -v
- 2m46s - store cache (Qt and wireshark-libs)
- (total duration about 36m)
- (installing Qt 5.12.0 from scratch would add 7m)

Cache size for extracted x64 build: wireshark-libs is 187M, Qt 604M.
(179M and 516M for 32-bit respectively.)

Change-Id: I9881ab6439e9ca99efad16a6c861862ab9d35252
Reviewed-by: Peter Wu <>
2019-01-12 21:56:47 +00:00
Peter Wu d76e32f478 travis: do not run pip as root
Both Ubuntu and macOS seems happy without it, removing sudo allows it to
be executed on Windows as well.

Change-Id: I9daece79d3bc5c97078ba27834de42228f7c3dc9
Reviewed-by: Anders Broman <>
2019-01-08 04:43:23 +00:00
Peter Wu d5c6ed80f1 travis: remove asciidoctor
It is already installed in brew setup does not install
it, but as no documentation is built it should not matter.

Change-Id: I0cfa343d1c837ebba3b020a6586fb4dd0ae57f9b
Reviewed-by: Anders Broman <>
2019-01-05 20:58:26 +00:00
Peter Wu 67dd5443a8 travis: remove obsolete sudo key
Container-based builds have been removed, sudo is always available now:

Change-Id: Id7cbcf0e406f4c7199f5fd7a3848023e78249a92
Reviewed-by: Anders Broman <>
2019-01-05 20:58:19 +00:00
Peter Wu 0a25bfe647 test: enable parallelism by default for pytest
Consistent with tools like "ninja", enable parallelism by default. It
can be disabled again with `pytest -n0`.

This makes pytest-xdist a dependency when pytest is used as test runner.
This does not affect the unittest-based test runnet (test/

Change-Id: I4dc905f097c57a869aa39487b15361502b431616
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <>
2019-01-05 06:47:25 +00:00
Peter Wu 2e411dba93 test: allow running pytest without specifying the tests directory
This allows `pytest` to be executed from the top-level source or build
directory (or any other directory below).

Change-Id: Ib7af2ea2aaf01319d6839d2dc67228fbb5a7bc34
Petri-Dish: Peter Wu <>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <>
2019-01-05 06:46:54 +00:00
Peter Wu ac58eafa32 Add support for RSA decryption using PKCS #11 tokens
Add support for loading RSA private key files from PKCS #11 tokens,
identified by PKCS #11 URIs. Add a new 'pkcs11_libs' UAT which can
dynamically load PKCS #11 provider libraries that are not found by

The configuration GUI will need additional code to discover available
PKCS #11 tokens and will be added later.

This feature requires GnuTLS 3.4 with PKCS #11 support, so Windows,
macOS via Homebrew, Ubuntu 16.04, Debian Stretch. Not supported: RHEL7.
Currently macOS via official packages disables PKCS #11 support, so that
will also not work.

Change-Id: I20646bfd69c6bd13c8c2d27cb65c164a4b0b7a66
Petri-Dish: Peter Wu <>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <>
2018-12-29 10:40:16 +00:00
Peter Wu b8a4843db5 test: enable extra test summary by default
This reports the reason why tests are skipped (for example, if a certain
binary was not built).

Change-Id: I19095f43f69228116d71b52380814a61894754af
Petri-Dish: Peter Wu <>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <>
2018-12-19 21:51:06 +00:00
Peter Wu 3ee5747481 travis,appveyor: display tshark --version output
This reveals the actual build configuration.

Change-Id: Ie49cea4a07faaa1b942ff6a973b03893f36ca16f
Reviewed-by: Anders Broman <>
2018-12-14 14:11:25 +00:00
Peter Wu a33d4ccb06 travis: upgrade to Xenial
Travis now supports Ubuntu 16.04 (Xenial):

Simplify the environment:
- Clang 7 is default,
  (ubuntu-toolchain-r-test is still needed because GCC 5.4 is default)
- libnghttp2-dev, libssh-gcrypt-dev and libmaxminddb-dev are available.
  (No longer requires ppa:wireshark-dev/stable)

Upgrading to Xenial will also enable Libgcrypt 1.6 tests and includes
GnuTLS 3.4.10 which will be useful for future PKCS #11 tests.
Gitlab's rpm-centos-7 still covers Libgcrypt 1.5.3 and GnuTLS 3.3.29.
Coverage will be lost for GnuTLS 3.2.11 (Ubuntu 14.04, Trusty).

Change-Id: Ic28bf23707c75b2c97bedad66206e9c1f129164c
Reviewed-by: Anders Broman <>
2018-12-14 14:11:15 +00:00
Peter Wu 2f79bf42b6 travis: increase verbosity with apt logging
Show the packages that are about to be installed.

Change-Id: Ifef21ae852075c5eb672bc0ca7b360f5b438283a
Reviewed-by: Peter Wu <>
2018-11-30 01:12:56 +00:00
Peter Wu e2e069e3fa travis: enable tests even if libpcap is disabled
Proper dependency tracking has been implemented such that tests that
require dumpcap are skipped when unavailable, let's enable tests again.
Use pytest for nicer traces.

Bug: 14949
Change-Id: I1751bed8bd62e1a69d6e19161f7517735ae96662
Reviewed-by: Peter Wu <>
2018-11-16 13:55:56 +00:00
Dario Lombardo b310a25dba travis: fully restyle the matrix.
It includes the following builds:
- osx default pcap on/off
- osx xcode 10.1 pcap on/off
- linux gcc-8 pcap on/off
- linux clang-7 pcap on/off


Change-Id: I21e20f3678d35d19756cb1ce1a7b97624f18c3e3
Tested-by: Dario Lombardo <>
Reviewed-by: Peter Wu <>
Reviewed-by: Dario Lombardo <>
2018-11-05 18:12:41 +00:00
Dario Lombardo 348333a100 travis: use ctest directly (allows parallel execution).
Change-Id: I74b2eb852ab2bac6b5151916c8f5fa52f7f7de49
Reviewed-by: Peter Wu <>
Reviewed-by: Dario Lombardo <>
2018-11-04 13:28:59 +00:00
Dario Lombardo 983390105f travis: fix indentation.
Change-Id: I5c69218d590d210d61b18c4dc6b7322b9a9ee2b1
Reviewed-by: Dario Lombardo <>
2018-11-03 09:43:09 +00:00
Dario Lombardo 7e000c9661 travis: fix typo.
Change-Id: Id5613fd9aa506d62e7a48585d6ea13c3db100068
Reviewed-by: Anders Broman <>
2018-07-06 14:30:51 +00:00
Peter Wu c1e5733a28 travis: remove unnecessary qt5 in PATH for macOS
Since v2.5.0rc0-1101-ged15895221 ("cmake: look for Qt5 from Homebrew on
macOS"), qt5 no longer needs to be in the PATH.

Change-Id: I1edadcb0eec8a38c4f7364353e57f92c80ca400f
Reviewed-by: Gerald Combs <>
2018-06-20 21:46:18 +00:00
Dario Lombardo 14456d0de8 travis: fix gem command line.
Change-Id: I84bc07edad1453b2e41311f21eb37454898a8fd5
Reviewed-by: Dario Lombardo <>
2018-06-05 06:57:09 +00:00
Dario Lombardo 70e49e8e13 travis: don't install asciidoctor's documentation.
Change-Id: I8d70cb7e940dc527c13e60195f4fd049cdff2481
Reviewed-by: Alexis La Goutte <>
2018-06-04 16:48:16 +00:00
Dario Lombardo 8beb669b32 travis: add regression tests to pcap builds.
Change-Id: Ibdd3f5bfc7ed0e6a75c83227d50d6e00dccf6814
Reviewed-by: Dario Lombardo <>
Reviewed-by: Peter Wu <>
2018-05-18 09:13:29 +00:00
Dario Lombardo 39586110d8 travis: add wireshark/stable ppa.
This is required for missing trusty packages (as nghttp2).

Change-Id: Ibff9f89c3a89c7e4593650384f97a23f05f899f3
Reviewed-by: Peter Wu <>
Petri-Dish: Peter Wu <>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <>
2018-05-18 04:11:17 +00:00