]> The Tcpdump Group git mirrors - tcpdump/commitdiff
CI: Add back running tcpdump -J/-L and capture, now with Cirrus VMs. 925/head
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 7 Jul 2021 16:37:12 +0000 (18:37 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 8 Jul 2021 14:25:15 +0000 (16:25 +0200)
The Cirrus virtual machines are throwaway.

Revert partially f5739ad4cab362afdebbf3af588e9f05e0e0009b.

.cirrus.yml
build.sh

index e84047805ba943ee95670f49c35d2e2034ab60bc..0a3e3d32c945e6a6f8cfbb354996d9a7e1a32f6a 100644 (file)
@@ -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 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
     - 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 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}
     - apt list --installed 'lib*-dev'
     - echo '$ git clone [...] libpcap.git'
     - git -C .. clone --depth ${CIRRUS_CLONE_DEPTH} --branch=master --quiet ${LIBPCAP_GIT}
index 10cdd0817556bf48dab97cab2e5555544efdaa0e..78def6a50b58198380e14d923e80407c0c39f964 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -72,6 +72,15 @@ Darwin)
     run_after_echo "otool -L $TCPDUMP_BIN"
     ;;
 esac
     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
 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
         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
 # 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