From 6aab5b7109b73c20eb63c08a3e0d6f2e5fe8ba04 Mon Sep 17 00:00:00 2001 From: Minos Galanakis Date: Thu, 25 Jul 2024 14:24:37 +0100 Subject: [PATCH] Created placeholder component files. Signed-off-by: Minos Galanakis --- tests/scripts/all.sh | 4 ++ tests/scripts/components-basic-checks.sh | 12 ++++++ tests/scripts/components-build-system.sh | 12 ++++++ tests/scripts/components-compiler.sh | 12 ++++++ tests/scripts/components-compliance.sh | 12 ++++++ .../components-configuration-crypto.sh | 12 ++++++ .../components-configuration-platform.sh | 0 tests/scripts/components-configuration-tls.sh | 12 ++++++ .../scripts/components-configuration-x509.sh | 12 ++++++ tests/scripts/components-configuration.sh | 12 ++++++ tests/scripts/components-platform.sh | 11 +++++ tests/scripts/components-sanitizers.sh | 11 +++++ tests/scripts/components.sh | 42 +++++++++++++++++++ 13 files changed, 164 insertions(+) create mode 100644 tests/scripts/components-basic-checks.sh create mode 100644 tests/scripts/components-build-system.sh create mode 100644 tests/scripts/components-compiler.sh create mode 100644 tests/scripts/components-compliance.sh create mode 100644 tests/scripts/components-configuration-crypto.sh create mode 100644 tests/scripts/components-configuration-platform.sh create mode 100644 tests/scripts/components-configuration-tls.sh create mode 100644 tests/scripts/components-configuration-x509.sh create mode 100644 tests/scripts/components-configuration.sh create mode 100644 tests/scripts/components-platform.sh create mode 100644 tests/scripts/components-sanitizers.sh create mode 100644 tests/scripts/components.sh diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 7c89a51f03..19eaa81995 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -1092,6 +1092,10 @@ helper_get_psa_key_type_list() { echo "$loc_list" } +# Include the components from components.sh +test_script_dir="${0%/*}" +source "$test_script_dir/components.sh" + # Helper function for controlling (start & stop) the psasim server. helper_psasim_server() { OPERATION=$1 diff --git a/tests/scripts/components-basic-checks.sh b/tests/scripts/components-basic-checks.sh new file mode 100644 index 0000000000..d8578cd23c --- /dev/null +++ b/tests/scripts/components-basic-checks.sh @@ -0,0 +1,12 @@ +# components-basic-checks.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file contains the test components that are executed by all.sh + +################################################################ +#### Basic checks +################################################################ + + diff --git a/tests/scripts/components-build-system.sh b/tests/scripts/components-build-system.sh new file mode 100644 index 0000000000..b8f09f4662 --- /dev/null +++ b/tests/scripts/components-build-system.sh @@ -0,0 +1,12 @@ +# components-build-system.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file contains the test components that are executed by all.sh + +################################################################ +#### Build System Testing +################################################################ + + diff --git a/tests/scripts/components-compiler.sh b/tests/scripts/components-compiler.sh new file mode 100644 index 0000000000..069edb82d9 --- /dev/null +++ b/tests/scripts/components-compiler.sh @@ -0,0 +1,12 @@ +# components-compiler.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file contains the test components that are executed by all.sh + +################################################################ +#### Compiler Testing +################################################################ + + diff --git a/tests/scripts/components-compliance.sh b/tests/scripts/components-compliance.sh new file mode 100644 index 0000000000..ac5a33d35f --- /dev/null +++ b/tests/scripts/components-compliance.sh @@ -0,0 +1,12 @@ +# components-sanitizers.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file contains the test components that are executed by all.sh + +################################################################ +#### Compliance Testing +################################################################ + + diff --git a/tests/scripts/components-configuration-crypto.sh b/tests/scripts/components-configuration-crypto.sh new file mode 100644 index 0000000000..701e7032e2 --- /dev/null +++ b/tests/scripts/components-configuration-crypto.sh @@ -0,0 +1,12 @@ +# components-configuration-crypto.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file contains the test components that are executed by all.sh + +################################################################ +#### Configuration Testing - Crypto +################################################################ + + diff --git a/tests/scripts/components-configuration-platform.sh b/tests/scripts/components-configuration-platform.sh new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/scripts/components-configuration-tls.sh b/tests/scripts/components-configuration-tls.sh new file mode 100644 index 0000000000..4622c3ad07 --- /dev/null +++ b/tests/scripts/components-configuration-tls.sh @@ -0,0 +1,12 @@ +# components-configuration-tls.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file contains the test components that are executed by all.sh + +################################################################ +#### Configuration Testing - TLS +################################################################ + + diff --git a/tests/scripts/components-configuration-x509.sh b/tests/scripts/components-configuration-x509.sh new file mode 100644 index 0000000000..8a6fd6b904 --- /dev/null +++ b/tests/scripts/components-configuration-x509.sh @@ -0,0 +1,12 @@ +# components-configuration-x509.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file contains the test components that are executed by all.sh + +################################################################ +#### Configuration Testing - X509 +################################################################ + + diff --git a/tests/scripts/components-configuration.sh b/tests/scripts/components-configuration.sh new file mode 100644 index 0000000000..ed6ec95364 --- /dev/null +++ b/tests/scripts/components-configuration.sh @@ -0,0 +1,12 @@ +# components-configuration.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file contains the test components that are executed by all.sh + +################################################################ +#### Configuration Testing +################################################################ + + diff --git a/tests/scripts/components-platform.sh b/tests/scripts/components-platform.sh new file mode 100644 index 0000000000..54abb8a6e5 --- /dev/null +++ b/tests/scripts/components-platform.sh @@ -0,0 +1,11 @@ +# components-platform.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file contains the test components that are executed by all.sh + +################################################################ +#### Platform Testing +################################################################ + diff --git a/tests/scripts/components-sanitizers.sh b/tests/scripts/components-sanitizers.sh new file mode 100644 index 0000000000..c863074b7f --- /dev/null +++ b/tests/scripts/components-sanitizers.sh @@ -0,0 +1,11 @@ +# components-sanitizers.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file contains the test components that are executed by all.sh + +################################################################ +#### Sanitizer Testing +################################################################ + diff --git a/tests/scripts/components.sh b/tests/scripts/components.sh new file mode 100644 index 0000000000..92bf05acfe --- /dev/null +++ b/tests/scripts/components.sh @@ -0,0 +1,42 @@ +# components.sh +# +# Copyright The Mbed TLS Contributors +# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later + +# This file contains the test components that are executed by all.sh + +# The functions below are named as follows: +# * component_XXX: independent components. They can be run in any order. +# * component_check_XXX: quick tests that aren't worth parallelizing. +# * component_build_XXX: build things but don't run them. +# * component_test_XXX: build and test. +# * component_release_XXX: tests that the CI should skip during PR testing. +# * support_XXX: if support_XXX exists and returns false then +# component_XXX is not run by default. + +# Each component must start by invoking `msg` with a short informative message. +# +# Warning: due to the way bash detects errors, the failure of a command +# inside 'if' or '!' is not detected. Use the 'not' function instead of '!'. +# +# Each component is executed in a separate shell process. The component +# fails if any command in it returns a non-zero status. +# +# The framework in all.sh performs some cleanup tasks after each component. +# This means that components can assume that the working directory is in a +# cleaned-up state, and don't need to perform the cleanup themselves. +# * Run `make clean`. +# * Restore `include/mbedtls/mbedtls_config.h` from a backup made before running +# the component. +# * Check out `Makefile`, `library/Makefile`, `programs/Makefile`, +# `tests/Makefile` and `programs/fuzz/Makefile` from git. +# This cleans up after an in-tree use of CMake. +# +# The tests are roughly in order from fastest to slowest. This doesn't +# have to be exact, but in general you should add slower tests towards +# the end and fast checks near the beginning. + + +################################################################ +#### Build and test many configurations and targets +################################################################