-
Notifications
You must be signed in to change notification settings - Fork 21
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
TF-PSA-Crypto Doxygen Adaptations #115
TF-PSA-Crypto Doxygen Adaptations #115
Conversation
3a2fde9
to
b22c1b6
Compare
fe80451
to
41789ad
Compare
41789ad
to
a86eefa
Compare
59e9177
to
f16b29c
Compare
a256c44
to
fa1bc66
Compare
7eea683
to
8660359
Compare
scripts/apidoc_full.sh
Outdated
mv $CONFIG_BAK $CONFIG_H | ||
elif in_tf_psa_crypto_repo; then | ||
scripts/config.py realfull | ||
cmake -DCMAKE_BUILD_TYPE:String=Check -DGEN_FILES=ON . |
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.
Having played with it, it would be better to build out of tree in a temporary directory. Otherwise when we run doxygen.sh
locally the source tree ends up with all the CMake artefacts. mktemp
is it seems the way to create a temporary directory in bash.
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.
tmp=$(mktemp -d)
creates a temporary directory in a user-configurable location (defaulting to /tmp
) and stores the location in $tmp
. tmp=$(TMPDIR=/path/to/parent mktemp -d)
creates a temporary directory under /path/to/parent
. Avoid other options to mktemp
for portability to older Linux and *BSD.
But do we really need a temporary directory name? We want to keep the Doxygen build products around, so why not use a fixed directory name like doxygen/build-apidoc-full
?
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.
The documentation is currently generated at the root of the source tree in the apidoc
directory thus we do not need to keep the build tree. A fixed build directory in the source tree would not really improve things regarding not modifying the build tree thus not sure it would be an improvement.
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.
A fixed build directory is slightly easier to program, and is easier to inspect and clean if an error occurs.
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.
okay the main thing I wanted to avoid here was to build in the source tree. I am fine with a build directory doxygen/build-apidoc-full
.
8660359
to
d5d468d
Compare
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.
To fix the CI test_full_cmake_clang and test_psa_compliance jobs you need to rebase on top of main.
scripts/apidoc_full.sh
Outdated
CRYPTO_CONFIG_H='include/psa/crypto_config.h' | ||
if in_mbedtls_repo; then | ||
CONFIG_H='include/mbedtls/mbedtls_config.h' | ||
CRYPTO_CONFIG_H='tf-psa-crypto/include/psa/crypto_config.h' |
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 does not work in 3.6 case.
d5d468d
to
b8bf60e
Compare
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.
A few things to fix, otherwise we do not plan to have mbedtls PRs for this thus we need a green CI and for that we need to rebase against latest main
.
scripts/apidoc_full.sh
Outdated
|
||
scripts/config.py realfull | ||
make apidoc | ||
if in_tf_psa_crypto_repo || (in_mbedtls_repo && !in_3_6_branch); then |
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.
if in_tf_psa_crypto_repo || (in_mbedtls_repo && !in_3_6_branch); then | |
if in_tf_psa_crypto_repo || (in_mbedtls_repo && ! in_3_6_branch); then |
without a space between the exclamation mark and "in_3_6_branch" it does not work.
scripts/apidoc_full.sh
Outdated
if in_mbedtls_repo; then | ||
CONFIG_H='include/mbedtls/mbedtls_config.h' | ||
if [ -r $CONFIG_H ]; then :; else | ||
echo "$CONFIG_H not found" >&2 | ||
fi | ||
fi | ||
|
||
CONFIG_BAK=${CONFIG_H}.bak | ||
cp -p $CONFIG_H $CONFIG_BAK | ||
if in_mbedtls_repo; then | ||
CRYPTO_CONFIG_H='tf-psa-crypto/include/psa/crypto_config.h' | ||
if [ -r $CRYPTO_CONFIG_H ]; then :; else | ||
echo "$CRYPTO_CONFIG_H not found" >&2 | ||
exit 1 | ||
fi | ||
fi |
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.
if in_mbedtls_repo; then
CONFIG_H='include/mbedtls/mbedtls_config.h'
if [ -r $CONFIG_H ]; then :; else
echo "$CONFIG_H not found" >&2
fi
if ! in_3_6_branch; then
CRYPTO_CONFIG_H='tf-psa-crypto/include/psa/crypto_config.h'
fi
fi
scripts/apidoc_full.sh
Outdated
if in_tf_psa_crypto_repo; then | ||
CRYPTO_CONFIG_H='include/psa/crypto_config.h' | ||
if [ -r $CRYPTO_CONFIG_H ]; then :; else | ||
echo "$CRYPTO_CONFIG_H not found" >&2 | ||
exit 1 | ||
fi | ||
fi |
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.
if in_tf_psa_crypto_repo; then | |
CRYPTO_CONFIG_H='include/psa/crypto_config.h' | |
if [ -r $CRYPTO_CONFIG_H ]; then :; else | |
echo "$CRYPTO_CONFIG_H not found" >&2 | |
exit 1 | |
fi | |
fi | |
if in_tf_psa_crypto_repo; then | |
CRYPTO_CONFIG_H='include/psa/crypto_config.h' | |
fi |
scripts/apidoc_full.sh
Outdated
if in_tf_psa_crypto_repo || (in_mbedtls_repo && !in_3_6_branch); then | ||
CRYPTO_CONFIG_BAK=${CRYPTO_CONFIG_H}.bak | ||
cp -p $CRYPTO_CONFIG_H $CRYPTO_CONFIG_BAK | ||
fi |
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.
if in_tf_psa_crypto_repo || (in_mbedtls_repo && !in_3_6_branch); then | |
CRYPTO_CONFIG_BAK=${CRYPTO_CONFIG_H}.bak | |
cp -p $CRYPTO_CONFIG_H $CRYPTO_CONFIG_BAK | |
fi | |
if in_tf_psa_crypto_repo || (in_mbedtls_repo && ! in_3_6_branch); then | |
if [ -r $CRYPTO_CONFIG_H ]; then :; else | |
echo "$CRYPTO_CONFIG_H not found" >&2 | |
exit 1 | |
fi | |
CRYPTO_CONFIG_BAK=${CRYPTO_CONFIG_H}.bak | |
cp -p $CRYPTO_CONFIG_H $CRYPTO_CONFIG_BAK | |
fi |
scripts/apidoc_full.sh
Outdated
cd $TF_PSA_CRYPTO_ROOT_DIR | ||
fi | ||
|
||
if in_tf_psa_crypto_repo || (in_mbedtls_repo && !in_3_6_branch); then |
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.
if in_tf_psa_crypto_repo || (in_mbedtls_repo && !in_3_6_branch); then | |
if in_tf_psa_crypto_repo || (in_mbedtls_repo && ! in_3_6_branch); then |
b8bf60e
to
4fef8d8
Compare
This commit adapts check-doxy-blocks to run for TF-PSA-Crypto. Signed-off-by: Harry Ramsey <[email protected]>
This commit adapts the scripts apidoc_full.sh and doxygen.sh to run for TF-PSA-Crypto out of source builds. Signed-off-by: Harry Ramsey <[email protected]>
4fef8d8
to
8172207
Compare
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, thanks.
Description
Adapt doxygen scripts to work for TF-PSA-Crypto.
PR checklist
Please add the numbers (or links) of the associated pull requests for consuming branches. You can omit branches where this pull request is not needed.
Notes for the submitter
Please refer to the contributing guidelines, especially the
checklist for PR contributors.
Help make review efficient: