1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Merge pull request #9706 from ronald-cron-arm/pkg-install-doc-lcov

tf-psa-crypto: cmake: Add support for pkg install, doc, lcov
This commit is contained in:
Ronald Cron
2024-10-24 06:39:58 +00:00
committed by GitHub
24 changed files with 318 additions and 53 deletions

View File

@@ -135,7 +135,32 @@ component_test_cmake_as_package () {
make
./cmake_package
if [[ "$OSTYPE" == linux* ]]; then
PKG_CONFIG_PATH="${build_variant_dir}/mbedtls/pkgconfig" ${root_dir}/tests/scripts/pkgconfig.sh
PKG_CONFIG_PATH="${build_variant_dir}/mbedtls/pkgconfig" \
${root_dir}/tests/scripts/pkgconfig.sh \
mbedtls mbedx509 mbedcrypto
# These are the EXPECTED package names. Renaming these could break
# consumers of pkg-config, consider carefully.
fi
}
component_test_tf_psa_crypto_cmake_as_package () {
# Remove existing generated files so that we use the ones CMake
# generates
make neat
msg "build: cmake 'as-package' build"
root_dir="$(pwd)"
cd tf-psa-crypto/programs/test/cmake_package
build_variant_dir="$(pwd)"
cmake .
make
./cmake_package
if [[ "$OSTYPE" == linux* ]]; then
PKG_CONFIG_PATH="${build_variant_dir}/tf-psa-crypto/pkgconfig" \
${root_dir}/tests/scripts/pkgconfig.sh \
tfpsacrypto
# This is the EXPECTED package name. Renaming it could break consumers
# of pkg-config, consider carefully.
fi
}

View File

@@ -18,11 +18,14 @@
set -e -u
# These are the EXPECTED package names. Renaming these could break
# consumers of pkg-config, consider carefully.
all_pcs="mbedtls mbedx509 mbedcrypto"
if [ $# -le 0 ]
then
echo " [!] No package names specified" >&2
echo "Usage: $0 <package name 1> <package name 2> ..." >&2
exit 1
fi
for pc in $all_pcs; do
for pc in "$@"; do
printf "testing package config file: ${pc} ... "
pkg-config --validate "${pc}"
version="$(pkg-config --modversion "${pc}")"