blob: f0f9fe14d0313158459e340655f2693648aca195 [file] [log] [blame]
Minos Galanakis77711192024-07-25 14:24:37 +01001# components.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 the test components that are executed by all.sh
7
8# The functions below are named as follows:
9# * component_XXX: independent components. They can be run in any order.
10# * component_check_XXX: quick tests that aren't worth parallelizing.
11# * component_build_XXX: build things but don't run them.
12# * component_test_XXX: build and test.
13# * component_release_XXX: tests that the CI should skip during PR testing.
14# * support_XXX: if support_XXX exists and returns false then
15# component_XXX is not run by default.
16
17# Each component must start by invoking `msg` with a short informative message.
18#
19# Warning: due to the way bash detects errors, the failure of a command
20# inside 'if' or '!' is not detected. Use the 'not' function instead of '!'.
21#
22# Each component is executed in a separate shell process. The component
23# fails if any command in it returns a non-zero status.
24#
25# The framework in all.sh performs some cleanup tasks after each component.
26# This means that components can assume that the working directory is in a
27# cleaned-up state, and don't need to perform the cleanup themselves.
28# * Run `make clean`.
29# * Restore `include/mbedtls/mbedtls_config.h` from a backup made before running
30# the component.
31# * Check out `Makefile`, `library/Makefile`, `programs/Makefile`,
32# `tests/Makefile` and `programs/fuzz/Makefile` from git.
33# This cleans up after an in-tree use of CMake.
34#
35# The tests are roughly in order from fastest to slowest. This doesn't
36# have to be exact, but in general you should add slower tests towards
37# the end and fast checks near the beginning.
38
39
40################################################################
41#### Build and test many configurations and targets
42################################################################
Minos Galanakisf7d1cb02024-07-30 17:25:31 +010043
44################################################################
45#### Basic checks
46################################################################
47
48#
49# Test Suites to be executed
50#
51# The test ordering tries to optimize for the following criteria:
52# 1. Catch possible problems early, by running first tests that run quickly
53# and/or are more likely to fail than others (eg I use Clang most of the
54# time, so start with a GCC build).
55# 2. Minimize total running time, by avoiding useless rebuilds
56#
57# Indicative running times are given for reference.
58
Minos Galanakisf7d1cb02024-07-30 17:25:31 +010059################################################################
60#### Build and test many configurations and targets
61################################################################
62
Minos Galanakisf7d1cb02024-07-30 17:25:31 +010063