haproxy/scripts
William Lallemand 1e7478bb4e TESTS: add a unit test runner in the Makefile
`make unit-tests` would run shell scripts from tests/unit/

The run-unittests.sh script will look for any .sh in tests/unit/ and
will call it twice:

- first with the 'check' argument in order to decide if we should skip
  the test or not
- second to run the check

A simple test could be written this way:

	#!/bin/sh

	check() {
	       ${HAPROXY_PROGRAM} -cc 'feature(OPENSSL)'
	       command -v socat
	}

	run() {
		 ${HAPROXY_PROGRAM} -dI -f ${ROOTDIR}/examples/quick-test.cfg -c
	}

	case "$1" in
	       "check")
	               check
	       ;;
	       "run")
	               run
	       ;;
	esac

The tests *MUST* be written in POSIX shell in order to be portable, and
any special commands should be tested with `command -v` before using it.

Tests are run with `sh -e` so everything must be tested.
2025-03-03 12:43:32 +01:00
..
announce-release SCRIPTS: announce-release: add a link to the data plane API 2022-11-28 07:31:54 +01:00
backport
build-ot.sh CI: refactor OpenTracing build script 2022-01-19 07:37:40 +01:00
build-ssl.sh BUILD: add possibility to use different QuicTLS variants 2025-02-25 10:29:46 +01:00
build-vtest.sh CI: vtest: temporarily build from the sd-notify PR 2024-11-20 12:07:38 +01:00
create-release SCRIPTS: create-release: no more need to skip architecture.txt 2024-07-10 15:38:45 +02:00
git-show-backports SCRIPTS: git-show-backports: do not truncate git-show output 2024-06-21 15:08:42 +02:00
make-releases-json CLEANUP: assorted typo fixes in the code and comments 2022-10-30 17:17:56 +01:00
mk-patch-list.sh SCRIPTS: mk-patch-list: produce a list of patches 2023-12-18 20:50:51 +01:00
publish-release SCRIPTS: publish-release: update the umask to keep group write access 2023-05-24 22:49:12 +02:00
run-regtests.sh REGTESTS: use -dW by default on every reg-tests 2024-11-19 16:53:10 +01:00
run-unittests.sh TESTS: add a unit test runner in the Makefile 2025-03-03 12:43:32 +01:00