-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Miscellaneous changes to scripts for PSA-Crypto enablement #7955
Miscellaneous changes to scripts for PSA-Crypto enablement #7955
Conversation
fd28e9a
to
c144d97
Compare
Test comment |
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.
This looks overall good to me, things to improve in test_psa_compliance.py though.
Introduce changes needed to run all.sh in the psa-crypto repo. Where behaviour must differ, detect that we are in the psa-crypto repo by checking for the 'core' directory. Signed-off-by: David Horstmann <[email protected]>
When detecting the root dir, look both for PSA Crypto and Mbed TLS directories. Signed-off-by: David Horstmann <[email protected]>
Signed-off-by: David Horstmann <[email protected]>
Signed-off-by: David Horstmann <[email protected]>
Signed-off-by: David Horstmann <[email protected]>
Instead of: ! in_psa_crypto_repo() use in_mbedtls_repo() Signed-off-by: David Horstmann <[email protected]>
Use CMake to build the library out-of-source (rather than make) in tests/scripts/test_psa_compliance.py and add a script argument for the out-of-source build directory. Signed-off-by: David Horstmann <[email protected]>
Signed-off-by: David Horstmann <[email protected]>
(For consistency with all.sh) Signed-off-by: David Horstmann <[email protected]>
ad6e0dd
to
0ac57ca
Compare
Rebased on development. 1 minor conflict in <<<<<<< HEAD
if ! git diff --quiet "$CONFIG_H"; then
err_msg "Warning - the configuration file 'include/mbedtls/mbedtls_config.h' has been edited. "
=======
if ! git diff --quiet $CONFIG_H; then
err_msg "Warning - the configuration file '$CONFIG_H' has been edited. "
>>>>>>> 6383d1b8f2ce (Make all.sh PSA-crypto-friendly) Resolved to add double quotes ( if ! git diff --quiet "$CONFIG_H"; then
err_msg "Warning - the configuration file '$CONFIG_H' has been edited. " |
Check for the 'drivers' and 'programs' directories additionally to the ones that are already there. Signed-off-by: David Horstmann <[email protected]>
Have separate in_mbedtls_repo() and in_psa_crypto_repo() functions Signed-off-by: David Horstmann <[email protected]>
Signed-off-by: David Horstmann <[email protected]>
Use the repo-specific test not just the Mbed TLS specific one. Signed-off-by: David Horstmann <[email protected]>
This makes it more repo-agnostic Signed-off-by: David Horstmann <[email protected]>
Either remove exclusive references to Mbed TLS or accompany them with references to "PSA Crypto". Signed-off-by: David Horstmann <[email protected]>
Signed-off-by: David Horstmann <[email protected]>
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.
This looks almost good to me. Otherwise mypy is not happy it seems and the CI is failing.
Signed-off-by: David Horstmann <[email protected]>
Use CMake's -t option to build only the crypto target. Parameterize the crypto target to have the right name depending on whether this is Mbed TLS or PSA Crypto. Signed-off-by: David Horstmann <[email protected]>
Signed-off-by: David Horstmann <[email protected]>
This will prevent CMake from mistaking the build directory for the source directory Signed-off-by: David Horstmann <[email protected]>
Signed-off-by: David Horstmann <[email protected]>
Signed-off-by: David Horstmann <[email protected]>
Signed-off-by: David Horstmann <[email protected]>
This enables compatibility with older versions of CMake that do not have the abbreviated switch. Signed-off-by: David Horstmann <[email protected]>
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.
This looks good to me, thanks.
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
Enable the scripts to be used either in Mbed TLS or in the PSA Cryptography repository.
Fixes Mbed-TLS/TF-PSA-Crypto#23
Specifically:
PR checklist
Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")