]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: skip system-override-compress-cert.sh for missing libs
authorDaiki Ueno <ueno@gnu.org>
Wed, 9 Jul 2025 20:58:52 +0000 (05:58 +0900)
committerDaiki Ueno <ueno@gnu.org>
Mon, 28 Jul 2025 08:17:19 +0000 (17:17 +0900)
The tls13/compress-cert-conf.c requires brotli and the test needs one
other algorithm; assume zstd and skip if any of those are missing.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
tests/system-override-compress-cert.sh

index 83cf8cf9d0ef460db98b9647e6e2ce8a45bd6195..48e00cc4df1c9dbc0b07b51e3d0783ecaced7997 100755 (executable)
@@ -19,6 +19,8 @@
 # You should have received a copy of the GNU Lesser General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>
 
+: ${CLI=../src/gnutls-cli${EXEEXT}}
+
 TEST=${builddir}/compress-cert-conf
 CONF=config.$$.tmp
 export GNUTLS_SYSTEM_PRIORITY_FILE=${CONF}
@@ -28,6 +30,18 @@ if test "${WINDIR}" != ""; then
        exit 77
 fi
 
+# The use of brotli is hard-coded in the tls13/compress-cert-conf.c
+if ! "$CLI" --list | grep '^Compression: .*COMP-BROTLI'; then
+       echo "Not built with brotli, skipping" 1>&2
+       exit 77
+fi
+
+# We need one other algorithm aside brotli, assuming zstd here
+if ! "$CLI" --list | grep '^Compression: .*COMP-ZSTD'; then
+       echo "Not built with zstd, skipping" 1>&2
+       exit 77
+fi
+
 cat <<_EOF_ > ${CONF}
 [overrides]
 cert-compression-alg = brotli