Commit Graph

79 Commits

Author SHA1 Message Date
Christopher Faulet
fa6798f97c REGTEST: script: Add the option --use-htx to enable the HTX in regtests
A check is done on HAProxy version to be sure it is supported. Internally, by
default, the macro 'no-htx' is set to "#". So in regtests, we can prefix
http-use-htx option line with this macro to inhibit the HTX. Concretly, this
line can be added in the HAProxy configuration:

   ${no-htx} option http-use-htx

When the option --use-htx is used, the macro 'no-htx' is unset.
2018-12-20 10:37:32 +01:00
Christopher Faulet
9c6df5ecb4 REGTEST: script: Add the option --keep-logs to keep all log directories
By default a log directory is kept only if the test fails. With this option it
is possible to always keep it. If this option is used, the result of all tests
are displayed (and not only the failing ones).
2018-12-20 10:37:24 +01:00
Christopher Faulet
2a7cf922c1 REGTEST: script: Add the option --debug to show logs on standard ouput
It implies the option --v. It is handy when you run the same test during a debug
session.
2018-12-20 10:33:18 +01:00
Christopher Faulet
8d0fdf5ef2 REGTEST: script: Add the option --clean to remove previous log direcotries
Running regtests several times leaves many direcotries. It is painful to remove
them by hand. This command do it for you. It ask a confirmation to proceed to be
sure. The template used to create log direcotries has been changed. The prefix
'haregtests-' has been added to help the cleanup function to find existing log
direcotries.
2018-12-20 10:33:18 +01:00
Christopher Faulet
1ecf0ea70a REGTEST: script: Evaluate the varnishtest command to allow quoted parameters
Instead of directly executing varnishtest command, we use a variable to build
the command line and we execute it with the 'eval' builtin. This way it is
possible to have quoted parameters. For instance:

  > ./scripts/run-regtests.sh --varnishtestparams "-Dmacro='some value' -n 10"

And the variable 'varnishtestparams' is also move at the end of the command
line, just before the list of test files. So it is possible to override all
default varnish options set by the script.
2018-12-20 10:33:18 +01:00
Christopher Faulet
8d67cf8187 REGTEST: script: Process script arguments before everything else
The help message is now in the function _help(). It exits the script with the
status 0 to not run regtests when the help is displayed. So it is also handy to
process script arguments before anything else. This avoids to start printing
messages related to regtests execution when it is not appropriate. Another
change, when it detects an invalid argument, the script exits with an error.
2018-12-20 10:33:18 +01:00
Willy Tarreau
d6cad12d1a SCRIPTS: add the slack channel URL to the announce script
It's just to provide the URL in the usual URLs when releasing.
2018-12-19 18:59:51 +01:00
Willy Tarreau
7f3327390f DOC: split the README into README + INSTALL
The README was barely usable after all the additions having accumulated
over the years. This patch introduces a new INSTALL file explaining how
to build and install haproxy with various levels of details. The README
is now mostly an index to the list of useful documentations.
2018-12-16 22:30:57 +01:00
Frederic Lecaille
d4f36e3eaa REGTEST: Reg testing improvements.
Add a new target to the Makefile named "reg-tests-help" to have an idea
about how to run the reg tests from haproxy Makefile.
Handle list of levels and lists of level range passed to make with LEVEL variable.
New supported syntax:
    LEVEL=1,4     make reg-tests
    LEVEL=1-2,5-6 make reg-tests
Add two new levels 5 and 6. 5 is for broken script, 6 for experimental scripts.

Signed-off-by: Frédéric Lécaille <flecaille@haproxy.com>
2018-12-14 06:50:45 +01:00
Willy Tarreau
939193a1a1 SCRIPTS/REGTEST: merge grep+sed into sed in run-regtests
Some commands chain grep and sed while sed already does grep by
default, let's simply use sed. In addition to being more intuitive,
it saves up to 150ms per run on the 13 tests covered by level 4.
2018-12-06 15:51:35 +01:00
Frédéric Lécaille
51e01b56ec REGTEST: Fix several issues.
Use #!bin/sh more portable shebang.
Support filenames with spaces.
Set HAPROXY_PROGRAM environment variable value to ${PWD}/haproxy.
exit(1) if we could not creat the higher level temporary working directory
or create its sub-directory with mktemp utility.
As defined by POSIX, use six characters for the mktemp template.
2018-11-30 05:58:45 +01:00
PiBa-NL
7250404b71 REGTEST/MINOR: script: add run-regtests.sh script
Some tests require a minimal haproxy version or compilation options to be
able to run successfully. This script allows to add 'requirements' to tests
to check so they will automatically be skipped if a requirement is not met.
The script supports several parameters to slightly modify its behavior
including the directories to search for tests.

Also some features are not available for certain OS's these can also
be 'excluded', this should allow for the complete set of test cases to be
run on any OS against any haproxy release without 'expected failures'.

The test .vtc files will need to be modified to include their 'requirements'
by listing including text options as shown below:
    #EXCLUDE_TARGETS=dos,freebsd,windows
    #REQUIRE_OPTIONS=ZLIB,OPENSSL,LUA
    #REQUIRE_VERSION=0.0
    #REQUIRE_VERSION_BELOW=99.9,
When excluding a OS by its TARGET, please do make a comment why the test
can not succeed on that TARGET.
2018-11-29 04:54:45 +01:00
Willy Tarreau
48d92ee3f4 SCRIPTS: git-show-backports: add missing quotes to "echo"
Two places were not properly protected, resulting in '*' in commit
subjects being interpreted!
2018-07-30 14:45:55 +02:00
Tim Duesterhus
3ce3811a9c BUILD: Generate sha256 checksums in publish-release
Currently only md5 signatures are generated. While md5
still is not broken with regard to preimage attacks, sha256
clearly is the current secure solution.

This patch should be backported to all supported branches.
2018-07-20 10:50:20 +02:00
Willy Tarreau
4a5be934f1 SCRIPTS: create-release: enforce GIT_COMMITTER_{NAME|EMAIL} validity
If it's not set, fall back to git config --get.
2017-06-16 12:43:53 +02:00
Willy Tarreau
2c44cd8a37 scripts: create-release pass -n to tail
Some versions of tail don't accept "tail +4".
2017-06-16 12:35:54 +02:00
Willy Tarreau
bd6989152f BUILD: scripts: add a "quiet" mode to publish-release
Option "-q" will make it silent in automatic mode when there is nothing to do.
2017-06-09 15:57:31 +02:00
Willy Tarreau
7ca88159a1 BUILD: scripts: add an automatic mode for publish-release
Passing "-a" will make it easier to automatically create archives from
tagged repositories. It doesn't ask any question and doesn't return an
error when the current branch is not tagged nor if the release already
exists.
2017-06-09 15:54:39 +02:00
Willy Tarreau
600cb57450 BUILD: scripts: make publish-release support bare repositories
First we must not report an error when "git diff HEAD" fails. Second, we
don't want to "cd" to the home dir when "git rev-parse --show-toplevel"
returns an empty string. Third, we definitely want to check that a master
branch really exists in the current directory to avoid mistakes.
2017-06-09 15:44:42 +02:00
Willy Tarreau
827385fb7c BUILD: scripts: fix typo in announce-release error message
It used to say the tag already existed instead of the opposite.
2017-03-27 19:36:45 +02:00
Willy Tarreau
6a375ef730 BUILD: make the release script use shortlog for the final changelog
It used to reuse the same command producting the list for the changelog,
requiring to run shortlog manually.
2017-03-27 19:32:24 +02:00
Willy Tarreau
990397ed2e BUILD: scripts: automatically update the branch in version.h when releasing
The stats page proudly displays "Updates (v1.5)". This version is inherited
from version.h which has not been updated since 1.5, so let's teach the
create-release script about it.

This must be backported to 1.7. 1.6 now uses the same script (externally)
for the release and will automatically benefit from it.
2017-01-05 20:00:25 +01:00
Willy Tarreau
5e637e556d SCRIPTS: git-show-backports: add -H to use the hash of the commit message
Sometimes certain commits don't contain useful tracking information but
we'd still like to be able to report them. Here we implement a hash on
the author's name, e-mail and date, the subject and the body before the
first s-o-b or cherry-picked line. These parts are supposed to be
reasonable invariant across backports and are usable to compute an
invariant hash of a given commit. When we don't find ancestry in a
commit, we try this method (if -H is specified) to compare commits
hashes and we can report a match. The equivalent commit is reported
as "XXXX+?" to indicate that it's an apparent backport but we don't
know how far it goes.
2016-12-14 16:48:16 +01:00
Willy Tarreau
b684cd4642 SCRIPTS: git-show-backports: fix a harmless typo
There was a double output redirection in this script while dumping the
current branch's refs which could cause either an error or an empty file.
2016-12-14 16:48:16 +01:00
Willy Tarreau
6cc2118106 SCRIPTS: make publish-release also copy the new SPOE doc
It may be useful for developers who want to experiment with the protocol.
2016-11-09 23:21:47 +01:00
Willy Tarreau
ef393a62d8 SCRIPTS: make git-show-backports also dump a "git show" command
This is very convenient for backport reviews as in a single
command you get all the patches one at a time with their
changelog and backport instructions.
2016-10-25 22:12:54 +02:00
Willy Tarreau
29c44e1f1e SCRIPTS: make git-show-backports capable of limiting its history
When comparing very different branches, it can take a very long time
to scan all commits from the very old common ancestor (eg: haproxy
1.4 to 1.7). Now it is possible to specify a range of commits instead
of a specific branch, and the analysis will be limited to this range
for all commits. The user is responsible for ensuring that the range
covers all possible backports from base to ref, otherwise some of them
may be reported missing while they are not.

This also works with linux kernels, for example :

   git-show-backports -u -q -m -r v3.14.69 -b v3.14.65 v3.10.101..HEAD
2016-05-19 07:19:19 +02:00
Willy Tarreau
29b684bf86 SCRIPTS: teach git-show-backports how to report upstream commits
When git-show-backports is called with -u, instead of reporting the
commit IDs of the original branch on the left, it will display the
upstream commit IDs when such IDs are known, and will also display
them in the suggested "git cherry-pick" command line. This is useful
when the new branch is more recent than the one being checked and/or
it is desired to get rid of intermediary changes.
2016-05-19 07:19:19 +02:00
Willy Tarreau
62b71eea5e BUILD: add a few release and backport scripts in scripts/
These ones have been used for several months already and are quite
convenient to emit new releases and backport fixes. I'm fed up with
having different versions on different machines, let's commit them
now.
2016-05-10 12:08:44 +02:00