diff --git a/.github/workflows/quick.yaml b/.github/workflows/quick.yaml index 2383244752a..60230415163 100644 --- a/.github/workflows/quick.yaml +++ b/.github/workflows/quick.yaml @@ -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 diff --git a/test-suite/buildtest.sh b/test-suite/buildtest.sh index 0c3ab21b56d..41a51741eae 100755 --- a/test-suite/buildtest.sh +++ b/test-suite/buildtest.sh @@ -16,6 +16,22 @@ 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 diff --git a/test-suite/buildtests/layer-02-maximus.opts b/test-suite/buildtests/layer-02-maximus.opts index ce03ab5350b..b8fc383b637 100644 --- a/test-suite/buildtests/layer-02-maximus.opts +++ b/test-suite/buildtests/layer-02-maximus.opts @@ -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. diff --git a/test-suite/buildtests/layer-04-noauth-everything.opts b/test-suite/buildtests/layer-04-noauth-everything.opts index f89911b3862..4f9ecc77e7d 100644 --- a/test-suite/buildtests/layer-04-noauth-everything.opts +++ b/test-suite/buildtests/layer-04-noauth-everything.opts @@ -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.