From: William Lallemand Date: Sat, 1 Mar 2025 18:16:18 +0000 (+0100) Subject: TESTS: add config smoke checks in the unit tests X-Git-Tag: v3.2-dev7~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8a6b0b06cdead9c6667b7d3715a6a042f09698a9;p=thirdparty%2Fhaproxy.git TESTS: add config smoke checks in the unit tests vtest.yml contains some config checks that are used to check the memleaks. This patch adds a unit test which runs the same tests. --- diff --git a/tests/unit/smoke/test.sh b/tests/unit/smoke/test.sh new file mode 100755 index 000000000..5d221ad3c --- /dev/null +++ b/tests/unit/smoke/test.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +check() { + ${HAPROXY_PROGRAM} -vv | grep CFLAGS | grep -q "fsanitize=address" +} + +run() { + ${HAPROXY_PROGRAM} -dI -f ${ROOTDIR}/.github/h2spec.config -c + ${HAPROXY_PROGRAM} -dI -f ${ROOTDIR}/examples/content-sw-sample.cfg -c + ${HAPROXY_PROGRAM} -dI -f ${ROOTDIR}/examples/option-http_proxy.cfg -c + ${HAPROXY_PROGRAM} -dI -f ${ROOTDIR}/examples/quick-test.cfg -c + ${HAPROXY_PROGRAM} -dI -f ${ROOTDIR}/examples/transparent_proxy.cfg -c +} + +case "$1" in + "check") + check + ;; + "run") + run + ;; +esac