2024-07-26 11:34:19 +00:00
|
|
|
# components-compliance.sh
|
2024-07-25 13:24:37 +00:00
|
|
|
#
|
|
|
|
# Copyright The Mbed TLS Contributors
|
|
|
|
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
|
|
|
|
2024-07-31 15:39:28 +00:00
|
|
|
# This file contains test components that are executed by all.sh
|
2024-07-25 13:24:37 +00:00
|
|
|
|
|
|
|
################################################################
|
|
|
|
#### Compliance Testing
|
|
|
|
################################################################
|
|
|
|
|
2024-07-26 14:23:39 +00:00
|
|
|
component_test_psa_compliance () {
|
|
|
|
# The arch tests build with gcc, so require use of gcc here to link properly
|
|
|
|
msg "build: make, default config (out-of-box), libmbedcrypto.a only"
|
|
|
|
CC=gcc make -C library libmbedcrypto.a
|
|
|
|
|
|
|
|
msg "unit test: test_psa_compliance.py"
|
2024-08-07 14:01:59 +00:00
|
|
|
CC=gcc ./tests/scripts/test_psa_compliance.py --build-dir="."
|
2024-07-26 14:23:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
support_test_psa_compliance () {
|
|
|
|
# psa-compliance-tests only supports CMake >= 3.10.0
|
|
|
|
ver="$(cmake --version)"
|
|
|
|
ver="${ver#cmake version }"
|
|
|
|
ver_major="${ver%%.*}"
|
|
|
|
|
|
|
|
ver="${ver#*.}"
|
|
|
|
ver_minor="${ver%%.*}"
|
|
|
|
|
|
|
|
[ "$ver_major" -eq 3 ] && [ "$ver_minor" -ge 10 ]
|
|
|
|
}
|
2024-07-25 13:24:37 +00:00
|
|
|
|