-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BACKPORT 2.28] tests: add a test for pkg-config files #9175
base: mbedtls-2.28
Are you sure you want to change the base?
Conversation
I'm afraid there are build failures. |
Yeah I've been looking into them to reproduce. |
Fun its a cmake version issue. |
ce3407d
to
c97edd3
Compare
The easiest solution was to just move this test into a different component rather than untangling the nightmare that would be needed for cmake_as_a_package related stuff. |
As a reminder, Mbed TLS 2.28 claims to support CMake 2.8.12, but our CI only has CMake 3.5.1 and above. New features or test-only code don't need to support ancient CMake, but they must not break existing build systems that uses the basic features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
tests/scripts/all.sh
Outdated
cmake -DUSE_SHARED_MBEDTLS_LIBRARY=On . | ||
make | ||
ldd programs/util/strerror | grep libmbedcrypto | ||
make test | ||
programs/test/dlopen_demo.sh | ||
PKG_CONFIG_PATH="${root_dir}/pkgconfig" ${root_dir}/tests/scripts/pkgconfig.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this is failing CI on FreeBSD, so shouldn't be done there I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it should be skipped there, I'll have to figure out how to do that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I have it skipping non-linux systems now for this port, lets see if the CI is happy
Add a test that does some basic validation of the pkg-config files. Note: this is a port of Mbed-TLS#8988 but is moved into a different test component so cmake shared infrastucture isn't needed. Note this port of the patch detects the OS and skips so things like freebsd do not fail. Example run: ./tests/scripts/all.sh test_cmake_shared ****************************************************************** * test_cmake_shared: build/test: cmake shared * Wed May 29 18:41:19 UTC 2024 ****************************************************************** cmake -DUSE_SHARED_MBEDTLS_LIBRARY=On . make <snip> testing package config file: mbedtls ... passed testing package config file: mbedx509 ... passed testing package config file: mbedcrypto ... passed make clean Signed-off-by: Bill Roberts <[email protected]>
c97edd3
to
0e3a325
Compare
Everything looks good apart from one thing:
|
have that fixed locally and didn't push |
Backport of #8988
PR checklist
Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")
provided, ornot required (Tests only, feature was previously added)not required(This is the 2.28 backport)not required(This is the 2.28 backport), or not required