If CONCURRENCY_LEVEL was set, the script would log a concurrency level
even if the parallel command was not available. Not log if parallel is
not available and set concurrency to 1.
For example, when I put the contents of a git worktree into
a Docker image for a test build .git will not be a directory
causing the run_check.sh script to fail.
When a script has been updated or introduced, it is interesting to
detect all errors at once. With this patch it is now possible to
do so by using:
NOT_TERMINAL=1 CONCURRENCY_LEVEL=12 qa/coccinelle/run_check.sh
This patch is an implementation of parallel check of files. It uses
GNU parallel to run multiple spatch at once.
The concurrency level is set via the CONCURRENCY_LEVEL environment
variable.
This patch adds two features to run_check.sh, it is now posssible
to specify a list of files to check:
./run_check.sh ../../src/suricata.c ../../src/detect.c
It is also possible to ask a review of the files modified by a commit.
To so simply put the SHA1 as argument
./run_check.sh HEAD
./run_check 6af7d5f
It is also possible to check all the files for an arbitrary range:
./run_check.sh origin/master..buildbot-fixes
Last improvement of this patch is to get a real error message in case
of problem as 2 is not redirected anymore to /dev/null.
This is a import of two coccinelle patches that detect problem
on Packet handling. They are run on all commited C files in src
by the script run_check.sh.