mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-09-14 06:09:55 +00:00
Split the rules to generate config tests
Have crypto handle the crypto part and tls handle the tls part. Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
+2
-6
@@ -30,10 +30,7 @@ GENERATED_MBEDTLS_CONFIG_DATA_FILES := $(patsubst tests/%,%,$(shell \
|
|||||||
ifeq ($(GENERATED_MBEDTLS_CONFIG_DATA_FILES),FAILED)
|
ifeq ($(GENERATED_MBEDTLS_CONFIG_DATA_FILES),FAILED)
|
||||||
$(error "$(PYTHON) ../framework/scripts/generate_config_tests.py --list" failed)
|
$(error "$(PYTHON) ../framework/scripts/generate_config_tests.py --list" failed)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
GENERATED_CONFIG_DATA_FILES := $(GENERATED_MBEDTLS_CONFIG_DATA_FILES) $(GENERATED_PSA_CONFIG_DATA_FILES)
|
|
||||||
GENERATED_DATA_FILES += $(GENERATED_MBEDTLS_CONFIG_DATA_FILES)
|
GENERATED_DATA_FILES += $(GENERATED_MBEDTLS_CONFIG_DATA_FILES)
|
||||||
TF_PSA_CRYPTO_TESTS_GENERATED_DATA_FILES += $(GENERATED_PSA_CONFIG_DATA_FILES)
|
|
||||||
|
|
||||||
GENERATED_C_FILES = \
|
GENERATED_C_FILES = \
|
||||||
include/test/test_keys.h include/test/test_certs.h
|
include/test/test_keys.h include/test/test_certs.h
|
||||||
@@ -69,15 +66,14 @@ generated_files: $(GENERATED_FILES)
|
|||||||
# output, to comment out certain options, or even to remove certain
|
# output, to comment out certain options, or even to remove certain
|
||||||
# lines which do affect the output negatively (it will miss the
|
# lines which do affect the output negatively (it will miss the
|
||||||
# corresponding test cases).
|
# corresponding test cases).
|
||||||
$(GENERATED_CONFIG_DATA_FILES): $(gen_file_dep) generated_config_test_data
|
$(GENERATED_MBEDTLS_CONFIG_DATA_FILES): $(gen_file_dep) generated_config_test_data
|
||||||
generated_config_test_data: ../framework/scripts/generate_config_tests.py
|
generated_config_test_data: ../framework/scripts/generate_config_tests.py
|
||||||
generated_config_test_data: ../scripts/config.py
|
generated_config_test_data: ../scripts/config.py
|
||||||
generated_config_test_data: ../framework/scripts/mbedtls_framework/test_case.py
|
generated_config_test_data: ../framework/scripts/mbedtls_framework/test_case.py
|
||||||
generated_config_test_data: ../framework/scripts/mbedtls_framework/test_data_generation.py
|
generated_config_test_data: ../framework/scripts/mbedtls_framework/test_data_generation.py
|
||||||
generated_config_test_data:
|
generated_config_test_data:
|
||||||
echo " Gen $(GENERATED_CONFIG_DATA_FILES)"
|
echo " Gen $(GENERATED_MBEDTLS_CONFIG_DATA_FILES)"
|
||||||
$(PYTHON) ../framework/scripts/generate_config_tests.py
|
$(PYTHON) ../framework/scripts/generate_config_tests.py
|
||||||
cd ../tf-psa-crypto && $(PYTHON) ./framework/scripts/generate_config_tests.py
|
|
||||||
.SECONDARY: generated_config_test_data
|
.SECONDARY: generated_config_test_data
|
||||||
|
|
||||||
# A test application is built for each suites/test_suite_*.data file.
|
# A test application is built for each suites/test_suite_*.data file.
|
||||||
|
|||||||
+19
-2
@@ -30,13 +30,30 @@ generated_bignum_test_data:
|
|||||||
$(PYTHON) ../framework/scripts/generate_bignum_tests.py --directory ../tf-psa-crypto/tests/suites
|
$(PYTHON) ../framework/scripts/generate_bignum_tests.py --directory ../tf-psa-crypto/tests/suites
|
||||||
.SECONDARY: generated_bignum_test_data
|
.SECONDARY: generated_bignum_test_data
|
||||||
|
|
||||||
GENERATED_PSA_CONFIG_DATA_FILES := $(addprefix ../tf-psa-crypto/,$(shell \
|
GENERATED_CRYPTO_CONFIG_DATA_FILES := $(addprefix ../tf-psa-crypto/,$(shell \
|
||||||
$(PYTHON) ../tf-psa-crypto/framework/scripts/generate_config_tests.py --list || \
|
$(PYTHON) ../tf-psa-crypto/framework/scripts/generate_config_tests.py --list || \
|
||||||
echo FAILED \
|
echo FAILED \
|
||||||
))
|
))
|
||||||
ifeq ($(GENERATED_PSA_CONFIG_DATA_FILES),FAILED)
|
ifeq ($(GENERATED_CRYPTO_CONFIG_DATA_FILES),FAILED)
|
||||||
$(error "$(PYTHON) ../tf-psa-crypto/framework/scripts/generate_config_tests.py --list" failed)
|
$(error "$(PYTHON) ../tf-psa-crypto/framework/scripts/generate_config_tests.py --list" failed)
|
||||||
endif
|
endif
|
||||||
|
TF_PSA_CRYPTO_TESTS_GENERATED_DATA_FILES += $(GENERATED_CRYPTO_CONFIG_DATA_FILES)
|
||||||
|
|
||||||
|
# We deliberately omit the configuration files (mbedtls_config.h,
|
||||||
|
# crypto_config.h) from the depenency list because during development
|
||||||
|
# and on the CI, we often edit those in a way that doesn't change the
|
||||||
|
# output, to comment out certain options, or even to remove certain
|
||||||
|
# lines which do affect the output negatively (it will miss the
|
||||||
|
# corresponding test cases).
|
||||||
|
$(GENERATED_CRYPTO_CONFIG_DATA_FILES): $(gen_file_dep) generated_crypto_config_test_data
|
||||||
|
generated_crypto_config_test_data: ../framework/scripts/generate_config_tests.py
|
||||||
|
generated_crypto_config_test_data: ../scripts/config.py
|
||||||
|
generated_crypto_config_test_data: ../framework/scripts/mbedtls_framework/test_case.py
|
||||||
|
generated_crypto_config_test_data: ../framework/scripts/mbedtls_framework/test_data_generation.py
|
||||||
|
generated_crypto_config_test_data:
|
||||||
|
echo " Gen $(GENERATED_CRYPTO_CONFIG_DATA_FILES)"
|
||||||
|
cd ../tf-psa-crypto && $(PYTHON) ./framework/scripts/generate_config_tests.py
|
||||||
|
.SECONDARY: generated_crypto_config_test_data
|
||||||
|
|
||||||
GENERATED_ECP_DATA_FILES := $(addprefix ../tf-psa-crypto/,$(shell \
|
GENERATED_ECP_DATA_FILES := $(addprefix ../tf-psa-crypto/,$(shell \
|
||||||
$(PYTHON) ../framework/scripts/generate_ecp_tests.py --list || \
|
$(PYTHON) ../framework/scripts/generate_ecp_tests.py --list || \
|
||||||
|
|||||||
Reference in New Issue
Block a user