Gilles Peskine | 570e548 | 2024-01-02 18:11:10 +0100 | [diff] [blame] | 1 | MBEDTLS_TEST_PATH = . |
Gilles Peskine | f3d1ae1 | 2023-12-22 11:40:58 +0100 | [diff] [blame] | 2 | include ../scripts/common.make |
Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 3 | |
Gilles Peskine | 396853a | 2021-09-20 18:57:55 +0200 | [diff] [blame] | 4 | # Set this to -v to see the details of failing test cases |
| 5 | TEST_FLAGS ?= $(if $(filter-out 0 OFF Off off NO No no FALSE False false N n,$(CTEST_OUTPUT_ON_FAILURE)),-v,) |
| 6 | |
Ronald Cron | c29afb6 | 2024-07-01 14:50:54 +0200 | [diff] [blame] | 7 | # Also include private headers, for the sake of invasive tests. |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 8 | LOCAL_CFLAGS += -I$(MBEDTLS_PATH)/library -I$(MBEDTLS_PATH)/tf-psa-crypto/core -I$(MBEDTLS_PATH)/tf-psa-crypto/drivers/builtin/src |
Ronald Cron | 1451a76 | 2024-06-10 16:02:04 +0200 | [diff] [blame] | 9 | |
Nicholas Wilson | 61fa436 | 2018-06-25 12:10:00 +0100 | [diff] [blame] | 10 | # Enable definition of various functions used throughout the testsuite |
| 11 | # (gethostname, strdup, fileno...) even when compiling with -std=c99. Harmless |
| 12 | # on non-POSIX platforms. |
| 13 | LOCAL_CFLAGS += -D_POSIX_C_SOURCE=200809L |
| 14 | |
Gilles Peskine | 5168155 | 2019-05-20 19:35:37 +0200 | [diff] [blame] | 15 | ifdef RECORD_PSA_STATUS_COVERAGE_LOG |
| 16 | LOCAL_CFLAGS += -Werror -DRECORD_PSA_STATUS_COVERAGE_LOG |
| 17 | endif |
| 18 | |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 19 | GENERATED_BIGNUM_DATA_FILES := $(addprefix ../tf-psa-crypto/,$(shell \ |
David Horstmann | f6f3bca | 2024-05-29 17:57:08 +0100 | [diff] [blame] | 20 | $(PYTHON) ../framework/scripts/generate_bignum_tests.py --list || \ |
Werner Lewis | 8b2df74 | 2022-07-08 13:54:57 +0100 | [diff] [blame] | 21 | echo FAILED \ |
| 22 | )) |
| 23 | ifeq ($(GENERATED_BIGNUM_DATA_FILES),FAILED) |
David Horstmann | f6f3bca | 2024-05-29 17:57:08 +0100 | [diff] [blame] | 24 | $(error "$(PYTHON) ../framework/scripts/generate_bignum_tests.py --list" failed) |
Werner Lewis | 8b2df74 | 2022-07-08 13:54:57 +0100 | [diff] [blame] | 25 | endif |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 26 | GENERATED_CRYPTO_DATA_FILES += $(GENERATED_BIGNUM_DATA_FILES) |
Gilles Peskine | b0aa75e | 2024-05-23 16:38:07 +0200 | [diff] [blame] | 27 | |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 28 | GENERATED_CONFIG_DATA_FILES_RAW := $(patsubst tests/%,%,$(shell \ |
Gilles Peskine | e154e6f | 2024-05-23 16:31:22 +0200 | [diff] [blame] | 29 | $(PYTHON) ../framework/scripts/generate_config_tests.py --list || \ |
| 30 | echo FAILED \ |
| 31 | )) |
| 32 | ifeq ($(GENERATED_CONFIG_DATA_FILES),FAILED) |
| 33 | $(error "$(PYTHON) ../framework/scripts/generate_config_tests.py --list" failed) |
| 34 | endif |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 35 | GENERATED_MBEDTLS_CONFIG_DATA_FILES := $(foreach file,$(GENERATED_CONFIG_DATA_FILES_RAW),$(if $(findstring mbedtls,$(file)),$(file),)) |
| 36 | GENERATED_PSA_CONFIG_DATA_FILES := $(foreach file,$(GENERATED_CONFIG_DATA_FILES_RAW),$(if $(findstring psa,$(file)),$(addprefix ../tf-psa-crypto/tests/,$(file)),)) |
| 37 | GENERATED_CONFIG_DATA_FILES := $(GENERATED_MBEDTLS_CONFIG_DATA_FILES)$(GENERATED_PSA_CONFIG_DATA_FILES) |
| 38 | GENERATED_DATA_FILES += $(GENERATED_MBEDTLS_CONFIG_DATA_FILES) |
| 39 | GENERATED_CRYPTO_DATA_FILES += $(GENERATED_PSA_CONFIG_DATA_FILES) |
Gilles Peskine | e154e6f | 2024-05-23 16:31:22 +0200 | [diff] [blame] | 40 | |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 41 | GENERATED_ECP_DATA_FILES := $(addprefix ../tf-psa-crypto/,$(shell \ |
David Horstmann | f6f3bca | 2024-05-29 17:57:08 +0100 | [diff] [blame] | 42 | $(PYTHON) ../framework/scripts/generate_ecp_tests.py --list || \ |
Gabor Mezei | 95ecaaf | 2023-01-16 16:53:29 +0100 | [diff] [blame] | 43 | echo FAILED \ |
| 44 | )) |
| 45 | ifeq ($(GENERATED_ECP_DATA_FILES),FAILED) |
David Horstmann | f6f3bca | 2024-05-29 17:57:08 +0100 | [diff] [blame] | 46 | $(error "$(PYTHON) ../framework/scripts/generate_ecp_tests.py --list" failed) |
Gabor Mezei | 95ecaaf | 2023-01-16 16:53:29 +0100 | [diff] [blame] | 47 | endif |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 48 | GENERATED_CRYPTO_DATA_FILES += $(GENERATED_ECP_DATA_FILES) |
Gilles Peskine | b0aa75e | 2024-05-23 16:38:07 +0200 | [diff] [blame] | 49 | |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 50 | GENERATED_PSA_DATA_FILES := $(addprefix ../tf-psa-crypto/,$(shell \ |
David Horstmann | f6f3bca | 2024-05-29 17:57:08 +0100 | [diff] [blame] | 51 | $(PYTHON) ../framework/scripts/generate_psa_tests.py --list || \ |
Gilles Peskine | e9ad95a | 2021-07-13 18:36:05 +0200 | [diff] [blame] | 52 | echo FAILED \ |
| 53 | )) |
Werner Lewis | 8b2df74 | 2022-07-08 13:54:57 +0100 | [diff] [blame] | 54 | ifeq ($(GENERATED_PSA_DATA_FILES),FAILED) |
David Horstmann | f6f3bca | 2024-05-29 17:57:08 +0100 | [diff] [blame] | 55 | $(error "$(PYTHON) ../framework/scripts/generate_psa_tests.py --list" failed) |
Gilles Peskine | e9ad95a | 2021-07-13 18:36:05 +0200 | [diff] [blame] | 56 | endif |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 57 | GENERATED_CRYPTO_DATA_FILES += $(GENERATED_PSA_DATA_FILES) |
Gilles Peskine | b0aa75e | 2024-05-23 16:38:07 +0200 | [diff] [blame] | 58 | |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 59 | GENERATED_FILES = $(GENERATED_DATA_FILES) $(GENERATED_CRYPTO_DATA_FILES) |
David Horstmann | e6a7c24 | 2024-11-06 11:30:05 +0000 | [diff] [blame] | 60 | GENERATED_FILES += ../framework/tests/src/test_keys.h src/test_certs.h |
Gilles Peskine | b0aa75e | 2024-05-23 16:38:07 +0200 | [diff] [blame] | 61 | |
Gilles Peskine | 870ed2a | 2024-09-25 10:27:47 +0200 | [diff] [blame] | 62 | # Generated files needed to (fully) run ssl-opt.sh |
| 63 | .PHONY: ssl-opt |
| 64 | |
Elena Uziunaite | b74c3ea | 2024-10-08 13:02:48 +0100 | [diff] [blame] | 65 | opt-testcases/tls13-compat.sh: ../framework/scripts/generate_tls13_compat_tests.py |
Gilles Peskine | 907e495 | 2024-09-19 19:09:33 +0200 | [diff] [blame] | 66 | echo " Gen $@" |
Elena Uziunaite | b74c3ea | 2024-10-08 13:02:48 +0100 | [diff] [blame] | 67 | $(PYTHON) ../framework/scripts/generate_tls13_compat_tests.py -o $@ |
Gilles Peskine | 3943a1a | 2024-09-13 15:57:44 +0200 | [diff] [blame] | 68 | GENERATED_FILES += opt-testcases/tls13-compat.sh |
Gilles Peskine | 870ed2a | 2024-09-25 10:27:47 +0200 | [diff] [blame] | 69 | ssl-opt: opt-testcases/tls13-compat.sh |
Gilles Peskine | 3943a1a | 2024-09-13 15:57:44 +0200 | [diff] [blame] | 70 | |
Gilles Peskine | b0aa75e | 2024-05-23 16:38:07 +0200 | [diff] [blame] | 71 | .PHONY: generated_files |
| 72 | generated_files: $(GENERATED_FILES) |
Gilles Peskine | 687d1ab | 2021-04-22 01:01:56 +0200 | [diff] [blame] | 73 | |
Werner Lewis | 8b2df74 | 2022-07-08 13:54:57 +0100 | [diff] [blame] | 74 | # generate_bignum_tests.py and generate_psa_tests.py spend more time analyzing |
| 75 | # inputs than generating outputs. Its inputs are the same no matter which files |
| 76 | # are being generated. |
Gilles Peskine | 5df77c6 | 2021-07-13 17:22:58 +0200 | [diff] [blame] | 77 | # It's rare not to want all the outputs. So always generate all of its outputs. |
| 78 | # Use an intermediate phony dependency so that parallel builds don't run |
| 79 | # a separate instance of the recipe for each output file. |
Gilles Peskine | 0b62b7a | 2023-09-08 16:19:13 +0200 | [diff] [blame] | 80 | $(GENERATED_BIGNUM_DATA_FILES): $(gen_file_dep) generated_bignum_test_data |
David Horstmann | f6f3bca | 2024-05-29 17:57:08 +0100 | [diff] [blame] | 81 | generated_bignum_test_data: ../framework/scripts/generate_bignum_tests.py |
David Horstmann | cd84bb2 | 2024-05-03 14:36:12 +0100 | [diff] [blame] | 82 | generated_bignum_test_data: ../framework/scripts/mbedtls_framework/bignum_common.py |
| 83 | generated_bignum_test_data: ../framework/scripts/mbedtls_framework/bignum_core.py |
| 84 | generated_bignum_test_data: ../framework/scripts/mbedtls_framework/bignum_mod_raw.py |
| 85 | generated_bignum_test_data: ../framework/scripts/mbedtls_framework/bignum_mod.py |
| 86 | generated_bignum_test_data: ../framework/scripts/mbedtls_framework/test_case.py |
| 87 | generated_bignum_test_data: ../framework/scripts/mbedtls_framework/test_data_generation.py |
Werner Lewis | 8b2df74 | 2022-07-08 13:54:57 +0100 | [diff] [blame] | 88 | generated_bignum_test_data: |
| 89 | echo " Gen $(GENERATED_BIGNUM_DATA_FILES)" |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 90 | $(PYTHON) ../framework/scripts/generate_bignum_tests.py --directory ../tf-psa-crypto/tests/suites |
Gilles Peskine | b0aa75e | 2024-05-23 16:38:07 +0200 | [diff] [blame] | 91 | .SECONDARY: generated_bignum_test_data |
Werner Lewis | 8b2df74 | 2022-07-08 13:54:57 +0100 | [diff] [blame] | 92 | |
Gilles Peskine | e154e6f | 2024-05-23 16:31:22 +0200 | [diff] [blame] | 93 | # We deliberately omit the configuration files (mbedtls_config.h, |
| 94 | # crypto_config.h) from the depenency list because during development |
| 95 | # and on the CI, we often edit those in a way that doesn't change the |
| 96 | # output, to comment out certain options, or even to remove certain |
| 97 | # lines which do affect the output negatively (it will miss the |
| 98 | # corresponding test cases). |
| 99 | $(GENERATED_CONFIG_DATA_FILES): $(gen_file_dep) generated_config_test_data |
| 100 | generated_config_test_data: ../framework/scripts/generate_config_tests.py |
| 101 | generated_config_test_data: ../scripts/config.py |
| 102 | generated_config_test_data: ../framework/scripts/mbedtls_framework/test_case.py |
| 103 | generated_config_test_data: ../framework/scripts/mbedtls_framework/test_data_generation.py |
| 104 | generated_config_test_data: |
| 105 | echo " Gen $(GENERATED_CONFIG_DATA_FILES)" |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 106 | $(PYTHON) ../framework/scripts/generate_config_tests.py $(GENERATED_MBEDTLS_CONFIG_DATA_FILES) |
| 107 | $(PYTHON) ../framework/scripts/generate_config_tests.py --directory ../tf-psa-crypto/tests/suites $(GENERATED_PSA_CONFIG_DATA_FILES) |
Gilles Peskine | e154e6f | 2024-05-23 16:31:22 +0200 | [diff] [blame] | 108 | .SECONDARY: generated_config_test_data |
Werner Lewis | 8b2df74 | 2022-07-08 13:54:57 +0100 | [diff] [blame] | 109 | |
Gilles Peskine | 0b62b7a | 2023-09-08 16:19:13 +0200 | [diff] [blame] | 110 | $(GENERATED_ECP_DATA_FILES): $(gen_file_dep) generated_ecp_test_data |
David Horstmann | f6f3bca | 2024-05-29 17:57:08 +0100 | [diff] [blame] | 111 | generated_ecp_test_data: ../framework/scripts/generate_ecp_tests.py |
David Horstmann | cd84bb2 | 2024-05-03 14:36:12 +0100 | [diff] [blame] | 112 | generated_ecp_test_data: ../framework/scripts/mbedtls_framework/bignum_common.py |
| 113 | generated_ecp_test_data: ../framework/scripts/mbedtls_framework/ecp.py |
| 114 | generated_ecp_test_data: ../framework/scripts/mbedtls_framework/test_case.py |
| 115 | generated_ecp_test_data: ../framework/scripts/mbedtls_framework/test_data_generation.py |
Gabor Mezei | 95ecaaf | 2023-01-16 16:53:29 +0100 | [diff] [blame] | 116 | generated_ecp_test_data: |
| 117 | echo " Gen $(GENERATED_ECP_DATA_FILES)" |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 118 | $(PYTHON) ../framework/scripts/generate_ecp_tests.py --directory ../tf-psa-crypto/tests/suites |
Gilles Peskine | b0aa75e | 2024-05-23 16:38:07 +0200 | [diff] [blame] | 119 | .SECONDARY: generated_ecp_test_data |
Gabor Mezei | 95ecaaf | 2023-01-16 16:53:29 +0100 | [diff] [blame] | 120 | |
Gilles Peskine | 0b62b7a | 2023-09-08 16:19:13 +0200 | [diff] [blame] | 121 | $(GENERATED_PSA_DATA_FILES): $(gen_file_dep) generated_psa_test_data |
David Horstmann | f6f3bca | 2024-05-29 17:57:08 +0100 | [diff] [blame] | 122 | generated_psa_test_data: ../framework/scripts/generate_psa_tests.py |
David Horstmann | cd84bb2 | 2024-05-03 14:36:12 +0100 | [diff] [blame] | 123 | generated_psa_test_data: ../framework/scripts/mbedtls_framework/crypto_data_tests.py |
| 124 | generated_psa_test_data: ../framework/scripts/mbedtls_framework/crypto_knowledge.py |
| 125 | generated_psa_test_data: ../framework/scripts/mbedtls_framework/macro_collector.py |
| 126 | generated_psa_test_data: ../framework/scripts/mbedtls_framework/psa_information.py |
| 127 | generated_psa_test_data: ../framework/scripts/mbedtls_framework/psa_storage.py |
| 128 | generated_psa_test_data: ../framework/scripts/mbedtls_framework/test_case.py |
| 129 | generated_psa_test_data: ../framework/scripts/mbedtls_framework/test_data_generation.py |
Gilles Peskine | 1411c7c | 2021-04-22 14:50:16 +0200 | [diff] [blame] | 130 | ## The generated file only depends on the options that are present in |
| 131 | ## crypto_config.h, not on which options are set. To avoid regenerating this |
| 132 | ## file all the time when switching between configurations, don't declare |
| 133 | ## crypto_config.h as a dependency. Remove this file from your working tree |
| 134 | ## if you've just added or removed an option in crypto_config.h. |
Ronald Cron | c7e9e36 | 2024-06-10 09:41:49 +0200 | [diff] [blame] | 135 | #generated_psa_test_data: ../tf-psa-crypto/include/psa/crypto_config.h |
| 136 | generated_psa_test_data: ../tf-psa-crypto/include/psa/crypto_values.h |
| 137 | generated_psa_test_data: ../tf-psa-crypto/include/psa/crypto_extra.h |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 138 | generated_psa_test_data: ../tf-psa-crypto/tests/suites/test_suite_psa_crypto_metadata.data |
Gilles Peskine | 5df77c6 | 2021-07-13 17:22:58 +0200 | [diff] [blame] | 139 | generated_psa_test_data: |
Werner Lewis | 8b2df74 | 2022-07-08 13:54:57 +0100 | [diff] [blame] | 140 | echo " Gen $(GENERATED_PSA_DATA_FILES) ..." |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 141 | $(PYTHON) ../framework/scripts/generate_psa_tests.py --directory ../tf-psa-crypto/tests/suites |
Gilles Peskine | b0aa75e | 2024-05-23 16:38:07 +0200 | [diff] [blame] | 142 | .SECONDARY: generated_psa_test_data |
Gilles Peskine | 687d1ab | 2021-04-22 01:01:56 +0200 | [diff] [blame] | 143 | |
Azim Khan | 27a35e7 | 2018-06-29 12:39:19 +0100 | [diff] [blame] | 144 | # A test application is built for each suites/test_suite_*.data file. |
| 145 | # Application name is same as .data file's base name and can be |
| 146 | # constructed by stripping path 'suites/' and extension .data. |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 147 | DATA_FILES = $(filter-out $(GENERATED_DATA_FILES), $(wildcard suites/test_suite_*.data)) |
| 148 | CRYPTO_DATA_FILES = $(filter-out $(GENERATED_CRYPTO_DATA_FILES), $(wildcard ../tf-psa-crypto/tests/suites/test_suite_*.data)) |
| 149 | |
Gilles Peskine | 687d1ab | 2021-04-22 01:01:56 +0200 | [diff] [blame] | 150 | # Make sure that generated data files are included even if they don't |
| 151 | # exist yet when the makefile is parsed. |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 152 | DATA_FILES += $(GENERATED_DATA_FILES) |
| 153 | CRYPTO_DATA_FILES += $(GENERATED_CRYPTO_DATA_FILES) |
| 154 | |
Gilles Peskine | 687d1ab | 2021-04-22 01:01:56 +0200 | [diff] [blame] | 155 | APPS = $(basename $(subst suites/,,$(DATA_FILES))) |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 156 | CRYPTO_APPS = $(basename $(subst suites/,,$(CRYPTO_DATA_FILES))) |
Mohammad Azim Khan | 94aefaf | 2017-03-23 12:32:54 +0000 | [diff] [blame] | 157 | |
Azim Khan | 27a35e7 | 2018-06-29 12:39:19 +0100 | [diff] [blame] | 158 | # Construct executable name by adding OS specific suffix $(EXEXT). |
Mohammad Azim Khan | 94aefaf | 2017-03-23 12:32:54 +0000 | [diff] [blame] | 159 | BINARIES := $(addsuffix $(EXEXT),$(APPS)) |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 160 | CRYPTO_BINARIES := $(addsuffix $(EXEXT),$(CRYPTO_APPS)) |
Mohammad Azim Khan | 94aefaf | 2017-03-23 12:32:54 +0000 | [diff] [blame] | 161 | |
Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 162 | .SILENT: |
| 163 | |
Manuel Pégourié-Gonnard | 5c59a4f | 2015-06-24 13:06:24 +0200 | [diff] [blame] | 164 | .PHONY: all check test clean |
| 165 | |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 166 | all: $(BINARIES) $(CRYPTO_BINARIES) |
Azim Khan | 1de892b | 2017-06-09 15:02:36 +0100 | [diff] [blame] | 167 | |
Ronald Cron | ddaf99c | 2020-06-19 11:27:26 +0200 | [diff] [blame] | 168 | mbedtls_test: $(MBEDTLS_TEST_OBJS) |
| 169 | |
David Horstmann | f6f3bca | 2024-05-29 17:57:08 +0100 | [diff] [blame] | 170 | src/test_certs.h: ../framework/scripts/generate_test_cert_macros.py \ |
| 171 | $($(PYTHON) ../framework/scripts/generate_test_cert_macros.py --list-dependencies) |
Gilles Peskine | 907e495 | 2024-09-19 19:09:33 +0200 | [diff] [blame] | 172 | echo " Gen $@" |
David Horstmann | f6f3bca | 2024-05-29 17:57:08 +0100 | [diff] [blame] | 173 | $(PYTHON) ../framework/scripts/generate_test_cert_macros.py --output $@ |
Valerio Setti | 8284f3d | 2024-04-08 17:52:12 +0200 | [diff] [blame] | 174 | |
David Horstmann | e6a7c24 | 2024-11-06 11:30:05 +0000 | [diff] [blame] | 175 | ../framework/tests/src/test_keys.h: ../framework/scripts/generate_test_keys.py |
Gilles Peskine | 907e495 | 2024-09-19 19:09:33 +0200 | [diff] [blame] | 176 | echo " Gen $@" |
David Horstmann | f6f3bca | 2024-05-29 17:57:08 +0100 | [diff] [blame] | 177 | $(PYTHON) ../framework/scripts/generate_test_keys.py --output $@ |
Valerio Setti | 8284f3d | 2024-04-08 17:52:12 +0200 | [diff] [blame] | 178 | |
Gilles Peskine | e1d51bd | 2021-01-20 19:47:23 +0100 | [diff] [blame] | 179 | TEST_OBJS_DEPS = $(wildcard include/test/*.h include/test/*/*.h) |
Gilles Peskine | d71539f | 2020-11-25 18:17:17 +0100 | [diff] [blame] | 180 | ifdef RECORD_PSA_STATUS_COVERAGE_LOG |
Gilles Peskine | 75829a4 | 2021-01-25 13:46:14 +0100 | [diff] [blame] | 181 | # Explicitly depend on this header because on a clean copy of the source tree, |
| 182 | # it doesn't exist yet and must be generated as part of the build, and |
| 183 | # therefore the wildcard enumeration above doesn't include it. |
David Horstmann | d962680 | 2024-11-08 10:59:21 +0000 | [diff] [blame^] | 184 | TEST_OBJS_DEPS += ../framework/tests/include/test/instrument_record_status.h |
Gilles Peskine | d71539f | 2020-11-25 18:17:17 +0100 | [diff] [blame] | 185 | endif |
David Horstmann | e6a7c24 | 2024-11-06 11:30:05 +0000 | [diff] [blame] | 186 | TEST_OBJS_DEPS += src/test_certs.h ../framework/tests/src/test_keys.h |
Gilles Peskine | d71539f | 2020-11-25 18:17:17 +0100 | [diff] [blame] | 187 | |
David Horstmann | 69b12ee | 2024-11-05 14:45:50 +0000 | [diff] [blame] | 188 | # Rule to compile common test C files in framework |
| 189 | ../framework/tests/src/%.o : ../framework/tests/src/%.c $(TEST_OBJS_DEPS) |
Ronald Cron | b6d6d4c | 2020-06-03 10:11:18 +0200 | [diff] [blame] | 190 | echo " CC $<" |
| 191 | $(CC) $(LOCAL_CFLAGS) $(CFLAGS) -o $@ -c $< |
| 192 | |
David Horstmann | 69b12ee | 2024-11-05 14:45:50 +0000 | [diff] [blame] | 193 | ../framework/tests/src/drivers/%.o : ../framework/tests/src/drivers/%.c |
| 194 | echo " CC $<" |
| 195 | $(CC) $(LOCAL_CFLAGS) $(CFLAGS) -o $@ -c $< |
| 196 | |
| 197 | # Rule to compile common test C files in src folder |
| 198 | src/%.o : src/%.c $(TEST_OBJS_DEPS) |
Steven Cooreman | a70d588 | 2020-07-16 20:26:18 +0200 | [diff] [blame] | 199 | echo " CC $<" |
| 200 | $(CC) $(LOCAL_CFLAGS) $(CFLAGS) -o $@ -c $< |
| 201 | |
Yanray Wang | b458b8c | 2022-10-28 11:49:33 +0800 | [diff] [blame] | 202 | src/test_helpers/%.o : src/test_helpers/%.c |
| 203 | echo " CC $<" |
| 204 | $(CC) $(LOCAL_CFLAGS) $(CFLAGS) -o $@ -c $< |
| 205 | |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 206 | C_FILES := $(addsuffix .c,$(APPS)) $(addsuffix .c,$(CRYPTO_APPS)) |
Gilles Peskine | 1d7cc08 | 2022-11-10 19:50:34 +0100 | [diff] [blame] | 207 | c: $(C_FILES) |
Mohammad Azim Khan | 94aefaf | 2017-03-23 12:32:54 +0000 | [diff] [blame] | 208 | |
Azim Khan | 27a35e7 | 2018-06-29 12:39:19 +0100 | [diff] [blame] | 209 | # Wildcard target for test code generation: |
| 210 | # A .c file is generated for each .data file in the suites/ directory. Each .c |
| 211 | # file depends on a .data and .function file from suites/ directory. Following |
| 212 | # nameing convention is followed: |
| 213 | # |
| 214 | # C file | Depends on |
| 215 | #----------------------------------------------------------------------------- |
| 216 | # foo.c | suites/foo.function suites/foo.data |
| 217 | # foo.bar.c | suites/foo.function suites/foo.bar.data |
| 218 | # |
| 219 | # Note above that .c and .data files have same base name. |
| 220 | # However, corresponding .function file's base name is the word before first |
| 221 | # dot in .c file's base name. |
| 222 | # |
Mohammad Azim Khan | 94aefaf | 2017-03-23 12:32:54 +0000 | [diff] [blame] | 223 | .SECONDEXPANSION: |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 224 | |
Gilles Peskine | 88a6baa | 2024-08-08 14:07:24 +0200 | [diff] [blame] | 225 | # First handle the tf-psa-crypto case, which has different paths from |
| 226 | # the local case. In GNU Make >=3.82, the shortest match applies regardless |
| 227 | # of the order in the makefile. In GNU Make <=3.81, the first matching rule |
| 228 | # applies. |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 229 | ../tf-psa-crypto/tests/%.c: ../tf-psa-crypto/tests/suites/$$(firstword $$(subst ., ,$$*)).function ../tf-psa-crypto/tests/suites/%.data ../framework/scripts/generate_test_code.py ../tf-psa-crypto/tests/suites/helpers.function ../tf-psa-crypto/tests/suites/main_test.function ../tf-psa-crypto/tests/suites/host_test.function |
| 230 | echo " Gen $@" |
| 231 | cd ../tf-psa-crypto/tests && $(PYTHON) ../../framework/scripts/generate_test_code.py -f suites/$(firstword $(subst ., ,$*)).function \ |
| 232 | -d suites/$*.data \ |
Azim Khan | 1de892b | 2017-06-09 15:02:36 +0100 | [diff] [blame] | 233 | -t suites/main_test.function \ |
Mohammad Azim Khan | 9540261 | 2017-07-19 10:15:54 +0100 | [diff] [blame] | 234 | -p suites/host_test.function \ |
Mohammad Azim Khan | fff4904 | 2017-03-28 01:48:31 +0100 | [diff] [blame] | 235 | -s suites \ |
Azim Khan | e3b26af | 2018-06-29 02:36:57 +0100 | [diff] [blame] | 236 | --helpers-file suites/helpers.function \ |
Mohammad Azim Khan | fff4904 | 2017-03-28 01:48:31 +0100 | [diff] [blame] | 237 | -o . |
Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 238 | |
Gilles Peskine | 88a6baa | 2024-08-08 14:07:24 +0200 | [diff] [blame] | 239 | %.c: suites/$$(firstword $$(subst ., ,$$*)).function suites/%.data ../framework/scripts/generate_test_code.py ../tf-psa-crypto/tests/suites/helpers.function ../tf-psa-crypto/tests/suites/main_test.function ../tf-psa-crypto/tests/suites/host_test.function |
| 240 | echo " Gen $@" |
| 241 | $(PYTHON) ../framework/scripts/generate_test_code.py -f suites/$(firstword $(subst ., ,$*)).function \ |
| 242 | -d suites/$*.data \ |
| 243 | -t ../tf-psa-crypto/tests/suites/main_test.function \ |
| 244 | -p ../tf-psa-crypto/tests/suites/host_test.function \ |
| 245 | -s suites \ |
| 246 | --helpers-file ../tf-psa-crypto/tests/suites/helpers.function \ |
| 247 | -o . |
| 248 | |
Gilles Peskine | d71539f | 2020-11-25 18:17:17 +0100 | [diff] [blame] | 249 | $(BINARIES): %$(EXEXT): %.c $(MBEDLIBS) $(TEST_OBJS_DEPS) $(MBEDTLS_TEST_OBJS) |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 250 | echo " CC $<" |
Gilles Peskine | 4ad5733 | 2023-12-22 11:30:30 +0100 | [diff] [blame] | 251 | $(CC) $(LOCAL_CFLAGS) $(CFLAGS) $< $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ |
Paul Bakker | 286bf3c | 2013-04-08 18:09:51 +0200 | [diff] [blame] | 252 | |
David Horstmann | 1b457a9 | 2024-11-04 15:53:42 +0000 | [diff] [blame] | 253 | LOCAL_CRYPTO_CFLAGS = $(patsubst -I./include, -I../../tests/include, $(patsubst -I../%,-I../../%, $(LOCAL_CFLAGS))) |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 254 | LOCAL_CRYPTO_LDFLAGS = $(patsubst -L../library, -L../../library, \ |
| 255 | $(patsubst -L../tests/%, -L../../tests/%, \ |
David Horstmann | cbab2ff | 2024-11-05 15:10:56 +0000 | [diff] [blame] | 256 | $(patsubst ./src/%,../../tests/src/%, \ |
| 257 | $(patsubst ../framework/tests/src/%,../../framework/tests/src/%, \ |
| 258 | $(LOCAL_LDFLAGS))))) |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 259 | $(CRYPTO_BINARIES): %$(EXEXT): %.c $(MBEDLIBS) $(TEST_OBJS_DEPS) $(MBEDTLS_TEST_OBJS) |
| 260 | echo " CC $<" |
| 261 | cd ../tf-psa-crypto/tests && $(CC) $(LOCAL_CRYPTO_CFLAGS) $(CFLAGS) $(subst $(EXEXT),,$(@F)).c $(LOCAL_CRYPTO_LDFLAGS) $(LDFLAGS) -o $(@F) |
| 262 | |
Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 263 | clean: |
Paul Bakker | 62f88dc | 2012-05-10 21:26:28 +0000 | [diff] [blame] | 264 | ifndef WINDOWS |
Valerio Setti | 0917265 | 2024-06-27 08:00:54 +0200 | [diff] [blame] | 265 | $(MAKE) -C psa-client-server/psasim clean |
Gilles Peskine | d025422 | 2021-09-14 11:28:22 +0200 | [diff] [blame] | 266 | rm -rf $(BINARIES) *.c *.datax |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 267 | rm -rf $(CRYPTO_BINARIES) ../tf-psa-crypto/tests/*.c ../tf-psa-crypto/tests/*.datax |
David Horstmann | 8a8d56a | 2024-11-06 15:53:14 +0000 | [diff] [blame] | 268 | rm -f src/*.o src/test_helpers/*.o src/libmbed* |
| 269 | rm -f ../framework/tests/src/*.o ../framework/tests/src/drivers/*.o |
Gilles Peskine | d71539f | 2020-11-25 18:17:17 +0100 | [diff] [blame] | 270 | rm -f include/test/instrument_record_status.h |
David Horstmann | dc45951 | 2024-11-07 17:08:11 +0000 | [diff] [blame] | 271 | rm -f ../framework/tests/include/alt-extra/*/*_alt.h |
Ronald Cron | 72b25da | 2021-04-28 18:29:24 +0200 | [diff] [blame] | 272 | rm -rf libtestdriver1 |
Valerio Setti | d1b6ef1 | 2024-05-07 16:00:21 +0200 | [diff] [blame] | 273 | rm -rf libpsaclient libpsaserver |
Manuel Pégourié-Gonnard | 8510105 | 2022-12-29 16:04:35 +0100 | [diff] [blame] | 274 | rm -f ../library/libtestdriver1.a |
Manuel Pégourié-Gonnard | 5c59a4f | 2015-06-24 13:06:24 +0200 | [diff] [blame] | 275 | else |
Darryl Green | 6c0f94c | 2018-10-17 16:12:33 +0100 | [diff] [blame] | 276 | if exist *.c del /Q /F *.c |
| 277 | if exist *.exe del /Q /F *.exe |
| 278 | if exist *.datax del /Q /F *.datax |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 279 | if exist ../tf-psa-crypto/tests/*.c del /Q /F ../tf-psa-crypto/tests/*.c |
| 280 | if exist ../tf-psa-crypto/tests/*.exe del /Q /F ../tf-psa-crypto/tests/*.exe |
| 281 | if exist ../tf-psa-crypto/tests/*.datax del /Q /F ../tf-psa-crypto/tests/*.datax |
Ronald Cron | b6d6d4c | 2020-06-03 10:11:18 +0200 | [diff] [blame] | 282 | if exist src/*.o del /Q /F src/*.o |
Yanray Wang | b458b8c | 2022-10-28 11:49:33 +0800 | [diff] [blame] | 283 | if exist src/test_helpers/*.o del /Q /F src/test_helpers/*.o |
David Horstmann | dcc78ee | 2024-08-28 16:28:46 +0100 | [diff] [blame] | 284 | if exist src/libmbed* del /Q /F src/libmbed* |
David Horstmann | 8a8d56a | 2024-11-06 15:53:14 +0000 | [diff] [blame] | 285 | if exist ../framework/tests/src/*.o del /Q /F ../framework/tests/src/*.o |
| 286 | if exist ../framework/tests/src/drivers/*.o del /Q /F ../framework/tests/src/drivers/*.o |
Gilles Peskine | d71539f | 2020-11-25 18:17:17 +0100 | [diff] [blame] | 287 | if exist include/test/instrument_record_status.h del /Q /F include/test/instrument_record_status.h |
Azim Khan | 27a35e7 | 2018-06-29 12:39:19 +0100 | [diff] [blame] | 288 | endif |
Paul Bakker | 0049c2f | 2009-07-11 19:15:43 +0000 | [diff] [blame] | 289 | |
Gilles Peskine | ac372cc | 2018-11-29 10:15:06 +0000 | [diff] [blame] | 290 | # Test suites caught by SKIP_TEST_SUITES are built but not executed. |
Ronald Cron | 901a675 | 2024-07-09 14:24:16 +0200 | [diff] [blame] | 291 | check: $(BINARIES) $(CRYPTO_BINARIES) |
Gilles Peskine | 396853a | 2021-09-20 18:57:55 +0200 | [diff] [blame] | 292 | perl scripts/run-test-suites.pl $(TEST_FLAGS) --skip=$(SKIP_TEST_SUITES) |
Manuel Pégourié-Gonnard | 5c59a4f | 2015-06-24 13:06:24 +0200 | [diff] [blame] | 293 | |
| 294 | test: check |
Mohammad Azim Khan | 1f29be7 | 2017-03-20 22:21:22 +0000 | [diff] [blame] | 295 | |
Gilles Peskine | df6e84a | 2023-02-22 22:09:51 +0100 | [diff] [blame] | 296 | # Generate variants of some headers for testing |
David Horstmann | dc45951 | 2024-11-07 17:08:11 +0000 | [diff] [blame] | 297 | ../framework/tests/include/alt-extra/%_alt.h: ../include/%.h |
Gilles Peskine | df6e84a | 2023-02-22 22:09:51 +0100 | [diff] [blame] | 298 | perl -p -e 's/^(# *(define|ifndef) +\w+_)H\b/$${1}ALT_H/' $< >$@ |
David Horstmann | dc45951 | 2024-11-07 17:08:11 +0000 | [diff] [blame] | 299 | ../framework/tests/include/alt-extra/%_alt.h: ../tf-psa-crypto/include/%.h |
Ronald Cron | c7e9e36 | 2024-06-10 09:41:49 +0200 | [diff] [blame] | 300 | perl -p -e 's/^(# *(define|ifndef) +\w+_)H\b/$${1}ALT_H/' $< >$@ |
David Horstmann | dc45951 | 2024-11-07 17:08:11 +0000 | [diff] [blame] | 301 | ../framework/tests/include/alt-extra/%_alt.h: ../tf-psa-crypto/drivers/builtin/include/%.h |
Ronald Cron | 3d817ad | 2024-06-14 08:43:28 +0200 | [diff] [blame] | 302 | perl -p -e 's/^(# *(define|ifndef) +\w+_)H\b/$${1}ALT_H/' $< >$@ |
Gilles Peskine | df6e84a | 2023-02-22 22:09:51 +0100 | [diff] [blame] | 303 | |
Ronald Cron | 72b25da | 2021-04-28 18:29:24 +0200 | [diff] [blame] | 304 | # Generate test library |
| 305 | |
| 306 | # Perl code that is executed to transform each original line from a library |
| 307 | # source file into the corresponding line in the test driver copy of the |
| 308 | # library. Add a LIBTESTDRIVER1_/libtestdriver1_ to mbedtls_xxx and psa_xxx |
| 309 | # symbols. |
| 310 | define libtestdriver1_rewrite := |
Ronald Cron | 52cc858 | 2024-06-17 17:26:39 +0200 | [diff] [blame] | 311 | s!^(\s*#\s*include\s*[\"<])mbedtls/build_info.h!$${1}libtestdriver1/include/mbedtls/build_info.h!; \ |
| 312 | s!^(\s*#\s*include\s*[\"<])mbedtls/mbedtls_config.h!$${1}libtestdriver1/include/mbedtls/mbedtls_config.h!; \ |
| 313 | s!^(\s*#\s*include\s*[\"<])mbedtls/config_adjust_legacy_crypto.h!$${1}libtestdriver1/include/mbedtls/config_adjust_legacy_crypto.h!; \ |
| 314 | s!^(\s*#\s*include\s*[\"<])mbedtls/config_adjust_x509.h!$${1}libtestdriver1/include/mbedtls/config_adjust_x509.h!; \ |
| 315 | s!^(\s*#\s*include\s*[\"<])mbedtls/config_adjust_ssl.h!$${1}libtestdriver1/include/mbedtls/config_adjust_ssl.h!; \ |
| 316 | s!^(\s*#\s*include\s*[\"<])mbedtls/check_config.h!$${1}libtestdriver1/include/mbedtls/check_config.h!; \ |
| 317 | s!^(\s*#\s*include\s*[\"<])mbedtls/!$${1}libtestdriver1/tf-psa-crypto/drivers/builtin/include/mbedtls/!; \ |
Ronald Cron | 1451a76 | 2024-06-10 16:02:04 +0200 | [diff] [blame] | 318 | s!^(\s*#\s*include\s*[\"<])psa/!$${1}libtestdriver1/tf-psa-crypto/include/psa/!; \ |
Ronald Cron | 72b25da | 2021-04-28 18:29:24 +0200 | [diff] [blame] | 319 | next if /^\s*#\s*include/; \ |
| 320 | s/\b(?=MBEDTLS_|PSA_)/LIBTESTDRIVER1_/g; \ |
| 321 | s/\b(?=mbedtls_|psa_)/libtestdriver1_/g; |
| 322 | endef |
| 323 | |
| 324 | libtestdriver1.a: |
Ronald Cron | 72b25da | 2021-04-28 18:29:24 +0200 | [diff] [blame] | 325 | rm -Rf ./libtestdriver1 |
| 326 | mkdir ./libtestdriver1 |
Ronald Cron | 4cc77a1 | 2024-07-02 08:52:26 +0200 | [diff] [blame] | 327 | mkdir ./libtestdriver1/tf-psa-crypto |
| 328 | mkdir ./libtestdriver1/tf-psa-crypto/drivers |
| 329 | mkdir ./libtestdriver1/tf-psa-crypto/drivers/everest |
| 330 | mkdir ./libtestdriver1/tf-psa-crypto/drivers/p256-m |
| 331 | touch ./libtestdriver1/tf-psa-crypto/drivers/everest/Makefile.inc |
| 332 | touch ./libtestdriver1/tf-psa-crypto/drivers/p256-m/Makefile.inc |
Ronald Cron | b2bdb78 | 2024-07-02 07:59:11 +0200 | [diff] [blame] | 333 | cp -Rf ../framework ./libtestdriver1 |
Ronald Cron | 72b25da | 2021-04-28 18:29:24 +0200 | [diff] [blame] | 334 | cp -Rf ../library ./libtestdriver1 |
| 335 | cp -Rf ../include ./libtestdriver1 |
Ronald Cron | 4cc77a1 | 2024-07-02 08:52:26 +0200 | [diff] [blame] | 336 | cp -Rf ../tf-psa-crypto/core ./libtestdriver1/tf-psa-crypto |
| 337 | cp -Rf ../tf-psa-crypto/include ./libtestdriver1/tf-psa-crypto |
| 338 | cp -Rf ../tf-psa-crypto/drivers/builtin ./libtestdriver1/tf-psa-crypto/drivers |
Ronald Cron | 72b25da | 2021-04-28 18:29:24 +0200 | [diff] [blame] | 339 | cp -Rf ../scripts ./libtestdriver1 |
Ronald Cron | 72b25da | 2021-04-28 18:29:24 +0200 | [diff] [blame] | 340 | |
| 341 | # Set the test driver base (minimal) configuration. |
David Horstmann | 6bbd9c0 | 2024-11-06 11:11:59 +0000 | [diff] [blame] | 342 | cp ../framework/tests/include/test/drivers/config_test_driver.h ./libtestdriver1/include/mbedtls/mbedtls_config.h |
Ronald Cron | 72b25da | 2021-04-28 18:29:24 +0200 | [diff] [blame] | 343 | |
| 344 | # Set the PSA cryptography configuration for the test library. |
| 345 | # It is set from the copied include/psa/crypto_config.h of the Mbed TLS |
| 346 | # library the test library is intended to be linked with extended by |
David Horstmann | 6bbd9c0 | 2024-11-06 11:11:59 +0000 | [diff] [blame] | 347 | # ../framework/tests/include/test/drivers/crypto_config_test_driver_extension.h to |
Ronald Cron | 72b25da | 2021-04-28 18:29:24 +0200 | [diff] [blame] | 348 | # mirror the PSA_ACCEL_* macros. |
Ronald Cron | 1451a76 | 2024-06-10 16:02:04 +0200 | [diff] [blame] | 349 | mv ./libtestdriver1/tf-psa-crypto/include/psa/crypto_config.h ./libtestdriver1/tf-psa-crypto/include/psa/crypto_config.h.bak |
| 350 | head -n -1 ./libtestdriver1/tf-psa-crypto/include/psa/crypto_config.h.bak > ./libtestdriver1/tf-psa-crypto/include/psa/crypto_config.h |
David Horstmann | 6bbd9c0 | 2024-11-06 11:11:59 +0000 | [diff] [blame] | 351 | cat ../framework/tests/include/test/drivers/crypto_config_test_driver_extension.h >> ./libtestdriver1/tf-psa-crypto/include/psa/crypto_config.h |
Ronald Cron | 1451a76 | 2024-06-10 16:02:04 +0200 | [diff] [blame] | 352 | echo "#endif /* PSA_CRYPTO_CONFIG_H */" >> ./libtestdriver1/tf-psa-crypto/include/psa/crypto_config.h |
Ronald Cron | 72b25da | 2021-04-28 18:29:24 +0200 | [diff] [blame] | 353 | |
| 354 | # Prefix MBEDTLS_* PSA_* symbols with LIBTESTDRIVER1_ as well as |
| 355 | # mbedtls_* psa_* symbols with libtestdriver1_ to avoid symbol clash |
| 356 | # when this test driver library is linked with the Mbed TLS library. |
| 357 | perl -pi -e '$(libtestdriver1_rewrite)' ./libtestdriver1/library/*.[ch] |
| 358 | perl -pi -e '$(libtestdriver1_rewrite)' ./libtestdriver1/include/*/*.h |
Ronald Cron | b2bdb78 | 2024-07-02 07:59:11 +0200 | [diff] [blame] | 359 | perl -pi -e '$(libtestdriver1_rewrite)' ./libtestdriver1/tf-psa-crypto/core/*.[ch] |
Ronald Cron | 1451a76 | 2024-06-10 16:02:04 +0200 | [diff] [blame] | 360 | perl -pi -e '$(libtestdriver1_rewrite)' ./libtestdriver1/tf-psa-crypto/include/*/*.h |
Ronald Cron | 52cc858 | 2024-06-17 17:26:39 +0200 | [diff] [blame] | 361 | perl -pi -e '$(libtestdriver1_rewrite)' ./libtestdriver1/tf-psa-crypto/drivers/builtin/include/*/*.h |
Ronald Cron | b2bdb78 | 2024-07-02 07:59:11 +0200 | [diff] [blame] | 362 | perl -pi -e '$(libtestdriver1_rewrite)' ./libtestdriver1/tf-psa-crypto/drivers/builtin/src/*.[ch] |
Ronald Cron | 72b25da | 2021-04-28 18:29:24 +0200 | [diff] [blame] | 363 | |
| 364 | $(MAKE) -C ./libtestdriver1/library CFLAGS="-I../../ $(CFLAGS)" LDFLAGS="$(LDFLAGS)" libmbedcrypto.a |
| 365 | cp ./libtestdriver1/library/libmbedcrypto.a ../library/libtestdriver1.a |
| 366 | |
Gilles Peskine | 5168155 | 2019-05-20 19:35:37 +0200 | [diff] [blame] | 367 | ifdef RECORD_PSA_STATUS_COVERAGE_LOG |
David Horstmann | d962680 | 2024-11-08 10:59:21 +0000 | [diff] [blame^] | 368 | ../framework/tests/include/test/instrument_record_status.h: ../tf-psa-crypto/include/psa/crypto.h Makefile |
Gilles Peskine | d71539f | 2020-11-25 18:17:17 +0100 | [diff] [blame] | 369 | echo " Gen $@" |
Ronald Cron | c7e9e36 | 2024-06-10 09:41:49 +0200 | [diff] [blame] | 370 | sed <../tf-psa-crypto/include/psa/crypto.h >$@ -n 's/^psa_status_t \([A-Za-z0-9_]*\)(.*/#define \1(...) RECORD_STATUS("\1", \1(__VA_ARGS__))/p' |
Gilles Peskine | 5168155 | 2019-05-20 19:35:37 +0200 | [diff] [blame] | 371 | endif |