haproxy/scripts
William Dauchy aabde71332 MINOR: reg-tests: add a way to add service dependency
I was looking at writing a simple first test for prometheus but I
realised there is no proper way to exclude it if haproxy was not built
with prometheus plugin.

Today we have `REQUIRE_OPTIONS` in reg-tests which is based on `Feature
list` from `haproxy -vv`. Those options are coming from the Makefile
itself.

A plugin is build this way:
  EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"

It does register service actions through `service_keywords_register`.
Those are listed through `list_services` in `haproxy -vv`.
To facilitate parsing, I slightly changed the output to a single line
and integrate it in regtests shell script so that we can now specify a
dependency while writing a reg-test for prometheus, e.g:

  #REQUIRE_SERVICE=prometheus-exporter
  #REQUIRE_SERVICES=prometheus-exporter,foo

There might be other ways to handle this, but that's the cleanest I
found; I understand people might be concerned by this output change in
`haproxy -vv` which goes from:

  Available services :
          foo
          bar

to:

  Available services : foo bar

Signed-off-by: William Dauchy <wdauchy@gmail.com>
2021-01-10 07:42:33 +01:00
..
announce-release SCRIPTS: announce-release: fix typo in help message 2021-01-08 14:58:22 +01:00
backport CLEANUP: assorted typo fixes in the code and comments 2020-04-17 09:37:36 +02:00
build-ssl.sh CI: travis-ci: replace not defined SSL_LIB, SSL_INC for BotringSSL builds 2020-10-11 21:12:33 +02:00
create-release REORG: include: move version.h to haproxy/ 2020-06-11 10:18:56 +02:00
git-show-backports SCRIPTS: git-show-backports: emit the shell command to backport a commit 2020-07-31 16:57:35 +02:00
publish-release SCRIPTS: publish-release: pass -n to gzip to remove timestamp 2020-05-30 06:59:07 +02:00
run-regtests.sh MINOR: reg-tests: add a way to add service dependency 2021-01-10 07:42:33 +01:00