blob: 38bcd01430d343869ca75c23b51d2cb3349ee7ab [file] [log] [blame]
Minos Galanakis77711192024-07-25 14:24:37 +01001# components-compliance.sh
2#
3# Copyright The Mbed TLS Contributors
4# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
5
6# This file contains test components that are executed by all.sh
7
8################################################################
9#### Compliance Testing
10################################################################
Minos Galanakisb298d1f2024-08-01 16:58:17 +010011
12component_test_psa_compliance () {
13 # The arch tests build with gcc, so require use of gcc here to link properly
14 msg "build: make, default config (out-of-box), libmbedcrypto.a only"
15 CC=gcc make -C library libmbedcrypto.a
16
17 msg "unit test: test_psa_compliance.py"
18 CC=gcc ./tests/scripts/test_psa_compliance.py
19}
20
21support_test_psa_compliance () {
22 # psa-compliance-tests only supports CMake >= 3.10.0
23 ver="$(cmake --version)"
24 ver="${ver#cmake version }"
25 ver_major="${ver%%.*}"
26
27 ver="${ver#*.}"
28 ver_minor="${ver%%.*}"
29
30 [ "$ver_major" -eq 3 ] && [ "$ver_minor" -ge 10 ]
31}