Move test_keys.h to include/test

Move test_keys.h to tests/include/test
instead of tests/src as it is used
outside of tests/src namely by
test_suite_pk.

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron 2024-12-09 09:10:51 +01:00
parent 04baacb228
commit f6eee5ad55
6 changed files with 10 additions and 10 deletions

@ -1 +1 @@
Subproject commit beb5dadbf26156f434ea58dce5c5a3182df4c60f
Subproject commit 4d16e0c3a64e16422f1991f4c28eba4de9318dfc

View File

@ -29,6 +29,6 @@ python framework\scripts\generate_config_tests.py tests\suites\test_suite_config
python framework\scripts\generate_config_tests.py --directory tf-psa-crypto\tests\suites tests\suites\test_suite_config.psa_boolean.data || exit /b 1
python framework\scripts\generate_ecp_tests.py --directory tf-psa-crypto\tests\suites || exit /b 1
python framework\scripts\generate_psa_tests.py --directory tf-psa-crypto\tests\suites || exit /b 1
python framework\scripts\generate_test_keys.py --output framework\tests\src\test_keys.h || exit /b 1
python framework\scripts\generate_test_keys.py --output framework\tests\include\test\test_keys.h || exit /b 1
python framework\scripts\generate_test_cert_macros.py --output tests\src\test_certs.h || exit /b 1
python framework\scripts\generate_tls13_compat_tests.py || exit /b 1

View File

@ -57,7 +57,7 @@ endif
GENERATED_CRYPTO_DATA_FILES += $(GENERATED_PSA_DATA_FILES)
GENERATED_FILES = $(GENERATED_DATA_FILES) $(GENERATED_CRYPTO_DATA_FILES)
GENERATED_FILES += ../framework/tests/src/test_keys.h src/test_certs.h
GENERATED_FILES += ../framework/tests/include/test/test_keys.h src/test_certs.h
# Generated files needed to (fully) run ssl-opt.sh
.PHONY: ssl-opt
@ -172,7 +172,7 @@ src/test_certs.h: ../framework/scripts/generate_test_cert_macros.py \
echo " Gen $@"
$(PYTHON) ../framework/scripts/generate_test_cert_macros.py --output $@
../framework/tests/src/test_keys.h: ../framework/scripts/generate_test_keys.py
../framework/tests/include/test/test_keys.h: ../framework/scripts/generate_test_keys.py
echo " Gen $@"
$(PYTHON) ../framework/scripts/generate_test_keys.py --output $@
@ -183,7 +183,7 @@ ifdef RECORD_PSA_STATUS_COVERAGE_LOG
# therefore the wildcard enumeration above doesn't include it.
TEST_OBJS_DEPS += ../framework/tests/include/test/instrument_record_status.h
endif
TEST_OBJS_DEPS += src/test_certs.h ../framework/tests/src/test_keys.h
TEST_OBJS_DEPS += src/test_certs.h ../framework/tests/include/test/test_keys.h
# Rule to compile common test C files in framework
../framework/tests/src/%.o : ../framework/tests/src/%.c $(TEST_OBJS_DEPS)

View File

@ -163,7 +163,7 @@ else
${crypto_core_dir}/psa_crypto_driver_wrappers_no_static.c
fi
check framework/scripts/generate_test_keys.py framework/tests/src/test_keys.h
check framework/scripts/generate_test_keys.py framework/tests/include/test/test_keys.h
# Additional checks for Mbed TLS only
if in_mbedtls_repo; then

View File

@ -409,17 +409,17 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
if(GEN_FILES)
add_custom_command(
OUTPUT
${TF_PSA_CRYPTO_FRAMEWORK_DIR}/tests/src/test_keys.h
${TF_PSA_CRYPTO_FRAMEWORK_DIR}/tests/include/test/test_keys.h
COMMAND
"${TF_PSA_CRYPTO_PYTHON_EXECUTABLE}"
"${TF_PSA_CRYPTO_FRAMEWORK_DIR}/scripts/generate_test_keys.py"
"--output"
"${TF_PSA_CRYPTO_FRAMEWORK_DIR}/tests/src/test_keys.h"
"${TF_PSA_CRYPTO_FRAMEWORK_DIR}/tests/include/test/test_keys.h"
DEPENDS
${TF_PSA_CRYPTO_FRAMEWORK_DIR}/scripts/generate_test_keys.py
)
add_custom_target(tf_psa_crypto_test_keys_header
DEPENDS ${TF_PSA_CRYPTO_FRAMEWORK_DIR}/tests/src/test_keys.h)
DEPENDS ${TF_PSA_CRYPTO_FRAMEWORK_DIR}/tests/include/test/test_keys.h)
add_dependencies(tf_psa_crypto_test tf_psa_crypto_test_keys_header)
endif()
target_include_directories(tf_psa_crypto_test

View File

@ -177,7 +177,7 @@
#define MBEDTLS_MD_ALG_FOR_TEST MBEDTLS_MD_SHA512
#endif
#include <../src/test_keys.h>
#include <test/test_keys.h>
/* Define an RSA key size we know it's present in predefined_key[] array. */
#define RSA_KEY_SIZE 1024