Add python integration tests and tezt tests for static binaries
This MR add new tests for the static binaries.
static biniaries were introduced a while ago, but never tests. The tacit assumption is that they would behave excatly as the dynamically linked binaries.
This is however not entirely true. This MR unearthed a couple of issue with the compilation of snoop and more importantly reveled that static binaries cannot be used for protocol injection. This is a limitation of the fact that when statically linking all libraries, the compiler remove the dynamic symbols used to load modules at runtime.
The interested reviwer can read the discussion on the ocaml forum : https://discuss.ocaml.org/t/dynlink-with-static-binary/8249
A small part of this MR was submitted as a side MR : !3360 (merged) to add a better error message to warn the user and fix two compilation problems related to static linking.
Since we want to run unit tests for the static binaries ( both on arm64
and amd64
), a small refactor is needed to build the static binaries during the build
stage.
Static binaries for x86_64
are always built, while arm64
static binaries are only build manually
I added two new jobs:
- the new
integration:static-binaries
job that is set on manual ( scheduled pipeline using the new template.rules_template__scheduled_or_manual
), - and a job
tezt:static-binaries
that is run for dev branches.
To avoid testing protocol injection on static binaries, I added an additional check to exclude a few tests if a static binary is detected.
The related issues for this MR is :
Fix : #1496 (closed) Fix : #1603 (closed)
Spinoff MRs: