haproxy/scripts
Willy Tarreau 9d5e11682c SCRIPTS: run-regtests: add a version check
It happens from time to time while switching between branches and/or
updating after someone else's changes that regtests are run by accident
on the wrong binary, typically the one the tests were run on during
development and not with the latest adaptations. And obviously it's
when this happens that we break the CI. There are various causes to
this but they all come down to humans context-switching a lot, and
there's no real fix for this that doesn't add even more burden hence
increases the overhead. However we can help the human detect such
mistakes very easily.

This change here will compare the version of the haproxy binary to
the version of the tree, and will emit a warning in the regtest output
if they do not match, regardless of the outcome of the test. This is
sufficient in case of failures because these are quickly glanced over,
and is sufficient as well in case of accidental success because the
warning is the last message. E.g:

  ########################## Starting vtest ##########################
  Testing with haproxy version: 2.7-dev10-cfcdbc-38
  Warning: version does not match the current tree (2.7-dev10-111c78-39)
  0 tests failed, 0 tests skipped, 182 tests passed

This should not affect builds made out of a git tree because the version
is retrieved using "make version", or exactly the same way as it's passd
to the haproxy binary. We just need to know what "make" command to run,
so $MAKE is used primarily, falling back to "make" then to "gmake". In
case all of these fail, we just ignore the version check. This should be
sufficient to catch human mistakes without affecting the CI.
2022-11-30 18:44:33 +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
build-ssl.sh BUILD: scripts: disable tests build on QuicTLS build 2022-10-17 05:51:18 +02:00
build-vtest.sh
create-release
git-show-backports
make-releases-json CLEANUP: assorted typo fixes in the code and comments 2022-10-30 17:17:56 +01:00
publish-release
run-regtests.sh SCRIPTS: run-regtests: add a version check 2022-11-30 18:44:33 +01:00