From: Francois-Xavier Le Bail Date: Wed, 7 Jul 2021 16:37:12 +0000 (+0200) Subject: CI: Add back running tcpdump -J/-L and capture, now with Cirrus VMs. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/24f217998d866e9199de829efa2bae432402bcd7 CI: Add back running tcpdump -J/-L and capture, now with Cirrus VMs. The Cirrus virtual machines are throwaway. Revert partially f5739ad4cab362afdebbf3af588e9f05e0e0009b. --- diff --git a/.cirrus.yml b/.cirrus.yml index e8404780..0a3e3d32 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -26,6 +26,7 @@ freebsd_task: - pkg install -qy git autoconf gcc10 - pkg install -qy cmake # for build_matrix.sh and build.sh - pkg install -qy pkgconf # for cmake, replaces pkg-config + - pkg install -qy sudo # for some tcpdump commands - echo '$ git clone [...] libpcap.git' - git -C .. clone --depth ${CIRRUS_CLONE_DEPTH} --branch=master --quiet ${LIBPCAP_GIT} - ./build_matrix.sh @@ -49,6 +50,7 @@ linux_task: - apt-get -qy install git autoconf make cmake clang gcc - apt-get -qy install flex bison libdbus-1-dev libbluetooth-dev libnl-genl-3-dev libibverbs-dev # for libpcap - apt-get -qy install libssl-dev libsmi2-dev libcap-ng-dev libpcap-dev + - apt-get -qy install sudo # for some tcpdump commands - apt list --installed 'lib*-dev' - echo '$ git clone [...] libpcap.git' - git -C .. clone --depth ${CIRRUS_CLONE_DEPTH} --branch=master --quiet ${LIBPCAP_GIT} diff --git a/build.sh b/build.sh index 10cdd081..78def6a5 100755 --- a/build.sh +++ b/build.sh @@ -72,6 +72,15 @@ Darwin) run_after_echo "otool -L $TCPDUMP_BIN" ;; esac +if [ "$CIRRUS_CI" = true ]; then + if [ -n "$LD_LIBRARY_PATH" ]; then + run_after_echo "sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH $TCPDUMP_BIN -J" + run_after_echo "sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH $TCPDUMP_BIN -L" + else + run_after_echo "sudo $TCPDUMP_BIN -J" + run_after_echo "sudo $TCPDUMP_BIN -L" + fi +fi if [ "$BUILD_LIBPCAP" = yes ]; then run_after_echo "make check" fi @@ -81,6 +90,13 @@ if [ "$CMAKE" = no ]; then run_after_echo "make releasetar" fi fi +if [ "$CIRRUS_CI" = true ]; then + if [ -n "$LD_LIBRARY_PATH" ]; then + run_after_echo "sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH $TCPDUMP_BIN -#n -c 10" + else + run_after_echo "sudo $TCPDUMP_BIN -#n -c 10" + fi +fi # Beware that setting MATRIX_DEBUG will produce A LOT of additional output # here and in any nested libpcap builds. Multiplied by the matrix size, the # full output log size might exceed limits of some CI systems (as previously