]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
CI: Enable eCAP and Valgrind in layer build tests if possible (#1996)
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Sun, 16 Mar 2025 22:03:22 +0000 (22:03 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 16 Mar 2025 22:03:26 +0000 (22:03 +0000)
Now these optional features are enabled during applicable layer tests if
their packages appear to be available on the build system. This should
help prevent regressions like the one fixed in recent commit 53ed1a9.

.github/workflows/quick.yaml
test-suite/buildtest.sh
test-suite/buildtests/layer-02-maximus.opts
test-suite/buildtests/layer-04-noauth-everything.opts

index 2383244752a1795d91220eadc48c79ec00ad011b..60230415163ad269558e3f8e3760f7969e609172 100644 (file)
@@ -136,7 +136,7 @@ jobs:
           sudo sed --in-place -E 's/# (deb-src.*updates main)/  \1/g' /etc/apt/sources.list
           sudo apt-get --quiet=2 update
           sudo apt-get --quiet=2 build-dep squid
-          sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin ${{ matrix.compiler.CC }} ccache
+          sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin ${{ matrix.compiler.CC }} ccache valgrind
 
       - name: Checkout sources
         uses: actions/checkout@v4
index 0c3ab21b56d8993ae5dfe19dd4bf410541055068..41a51741eae27e9a2010d3b85370c8c00d5d0459 100755 (executable)
 action="${1}"
 config="${2}"
 
+# Allow a layer to enable optional default-disabled features when
+# those features are supported in the current build environment
+# (and we can easily detect such support).
+if ${PKG_CONFIG:-pkg-config} --exists 'libecap >= 1.0 libecap < 1.1' 2>/dev/null
+then
+    CONFIGURE_FLAGS_MAYBE_ENABLE_ECAP="--enable-ecap"
+else
+    echo "WARNING: eCAP testing disabled" >&2
+fi
+if ${PKG_CONFIG:-pkg-config} --exists valgrind 2>/dev/null
+then
+    CONFIGURE_FLAGS_MAYBE_ENABLE_VALGRIND="--with-valgrind-debug"
+else
+    echo "WARNING: Valgrind testing disabled" >&2
+fi
+
 # cache_file may be set by environment variable
 configcache=""
 if [ -n "$cache_file" ]; then
index ce03ab5350b0a53cb843dfd1d5ced06f6e05d34a..b8fc383b6370e3bd48d507b987702f28567e9081 100644 (file)
@@ -37,11 +37,9 @@ MAKETEST="distcheck"
 #      We can't test them automatically everywhere without detecting those
 #      optional packages first.
 #
-#   --enable-ecap \
 #   --enable-epoll \
 #   --enable-kqueue \
 #   --enable-win32-service \
-#   --with-valgrind-debug \
 #   --with-gnutls \
 #   --with-tdb \
 #   --with-cap \
@@ -110,6 +108,8 @@ DISTCHECK_CONFIGURE_FLAGS=" \
        --enable-build-info=squid\ test\ build \
        --enable-ssl-crtd \
        --with-openssl \
+       $CONFIGURE_FLAGS_MAYBE_ENABLE_ECAP \
+       $CONFIGURE_FLAGS_MAYBE_ENABLE_VALGRIND \
        "
 
 # Fix the distclean testing.
index f89911b3862d93da00531de9e1bb837ce791c450..4f9ecc77e7d2fdb03d2f21c4538129cf444a3351 100644 (file)
@@ -42,11 +42,9 @@ MAKETEST="distcheck"
 #      We can't test them automatically everywhere without detecting those
 #      optional packages first.
 #
-#   --enable-ecap \
 #   --enable-epoll \
 #   --enable-kqueue \
 #   --enable-win32-service \
-#   --with-valgrind-debug \
 #   --with-ldap \
 #
 #   --enable-cpu-profiling \  Requires CPU support.
@@ -110,6 +108,8 @@ DISTCHECK_CONFIGURE_FLAGS=" \
        --with-pic \
        --with-pthreads \
        --enable-build-info=squid\ test\ build \
+       $CONFIGURE_FLAGS_MAYBE_ENABLE_ECAP \
+       $CONFIGURE_FLAGS_MAYBE_ENABLE_VALGRIND \
        "
 
 # Fix the distclean testing.