]> The Tcpdump Group git mirrors - libpcap/commitdiff
CI: Test with IPv6 support enabled/disabled
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 23 May 2023 09:00:57 +0000 (11:00 +0200)
committerfxlb <[email protected]>
Tue, 23 May 2023 11:57:46 +0000 (11:57 +0000)
build.sh
build_matrix.sh

index d00bb5007f228a119f66eec1578bce96537361c7..ef80e4ad2049f11cdf314a0907f4446e358b38be 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -1,9 +1,10 @@
 #!/bin/sh -e
 
-# This script runs one build with setup environment variables: CC, CMAKE and
-# REMOTE.
+# This script runs one build with setup environment variables: CC, CMAKE, IPV6
+# and REMOTE.
 : "${CC:=gcc}"
 : "${CMAKE:=no}"
+: "${IPV6:=no}"
 : "${REMOTE:=no}"
 : "${LIBPCAP_TAINTED:=no}"
 : "${LIBPCAP_CMAKE_TAINTED:=no}"
@@ -105,7 +106,7 @@ esac
 
 if [ "$CMAKE" = no ]; then
     run_after_echo ./autogen.sh
-    run_after_echo ./configure --prefix="$PREFIX" --enable-remote="$REMOTE"
+    run_after_echo ./configure --prefix="$PREFIX" --enable-ipv6="$IPV6" --enable-remote="$REMOTE"
 else
     # Remove the leftovers from any earlier in-source builds, so this
     # out-of-source build does not break because of that.
@@ -118,7 +119,7 @@ else
     run_after_echo cd build
     run_after_echo cmake ${CFLAGS:+-DEXTRA_CFLAGS="$CFLAGS"} \
         "$CMAKE_OPTIONS" \
-        -DCMAKE_INSTALL_PREFIX="$PREFIX" -DENABLE_REMOTE="$REMOTE" ..
+        -DCMAKE_INSTALL_PREFIX="$PREFIX" -DINET6="$IPV6" -DENABLE_REMOTE="$REMOTE" ..
 fi
 run_after_echo "$MAKE_BIN" -s clean
 if [ "$CMAKE" = no ]; then
index 4797864408c9aaa3540d276a249f620421c89c0d..0c9bec269fc1d3c3cf04b06888c4ba21c74fe499 100755 (executable)
@@ -1,10 +1,11 @@
 #!/bin/sh -e
 
 # This script executes the matrix loops, exclude tests and cleaning.
-# The matrix can be configured with the following environment variables: MATRIX_CC,
-# MATRIX_CMAKE and MATRIX_REMOTE.
+# The matrix can be configured with the following environment variables:
+# MATRIX_CC, MATRIX_CMAKE, MATRIX_IPV6 and MATRIX_REMOTE.
 : "${MATRIX_CC:=gcc clang}"
 : "${MATRIX_CMAKE:=no yes}"
+: "${MATRIX_IPV6:=no yes}"
 : "${MATRIX_REMOTE:=no yes}"
 # Set this variable to "yes" before calling this script to disregard all cmake
 # warnings in a particular environment (CI or a local working copy).  Set it
@@ -22,7 +23,7 @@
 # GNU Make available as "gmake".
 : "${MAKE_BIN:=make}"
 # It calls the build.sh script which runs one build with setup environment
-# variables: CC, CMAKE and REMOTE.
+# variables: CC, CMAKE, IPV6 and REMOTE.
 
 . ./build_common.sh
 print_sysinfo
@@ -50,16 +51,20 @@ for CC in $MATRIX_CC; do
     fi
     for CMAKE in $MATRIX_CMAKE; do
         export CMAKE
-        for REMOTE in $MATRIX_REMOTE; do
-            export REMOTE
-            COUNT=`increment $COUNT`
-            echo_magenta "===== SETUP $COUNT: CC=$CC CMAKE=$CMAKE REMOTE=$REMOTE =====" >&2
-            # Run one build with setup environment variables: CC, CMAKE and REMOTE
-            run_after_echo ./build.sh
-            echo 'Cleaning...'
-            if [ "$CMAKE" = yes ]; then rm -rf build; else "$MAKE_BIN" distclean; fi
-            purge_directory "$PREFIX"
-            run_after_echo git status -suall
+        for IPV6 in $MATRIX_IPV6; do
+            export IPV6
+            for REMOTE in $MATRIX_REMOTE; do
+                export REMOTE
+                COUNT=`increment $COUNT`
+                echo_magenta "===== SETUP $COUNT: CC=$CC CMAKE=$CMAKE IPV6=$IPV6 REMOTE=$REMOTE =====" >&2
+                # Run one build with setup environment variables: CC, CMAKE,
+                # IPV6 and REMOTE
+                run_after_echo ./build.sh
+                echo 'Cleaning...'
+                if [ "$CMAKE" = yes ]; then rm -rf build; else "$MAKE_BIN" distclean; fi
+                purge_directory "$PREFIX"
+                run_after_echo git status -suall
+            done
         done
     done
 done