diff --git a/scripts/psa_crypto.py b/scripts/psa_crypto.py index a9e72bf1b..c903ac89a 100755 --- a/scripts/psa_crypto.py +++ b/scripts/psa_crypto.py @@ -153,6 +153,7 @@ def copy_from_tests(mbedtls_root_path, psa_crypto_root_path): "generate_test_code.py|"\ "scripts_path.py|"\ "test_generate_test_code.py|"\ + "check_generated_files.sh|"\ "test_psa_compliance.py", file_), os.listdir(scripts_source_path)) for file_ in scripts_files: diff --git a/tests/all_sh_components.txt b/tests/all_sh_components.txt index 2689850da..391c03d6b 100644 --- a/tests/all_sh_components.txt +++ b/tests/all_sh_components.txt @@ -161,3 +161,27 @@ component_test_psa_drivers () { cd "$TF_PSA_CRYPTO_ROOT_DIR" rm -rf "$OUT_OF_SOURCE_DIR" } + +component_check_generated_files () { + msg "Check: check-generated-files, files generated with cmake" # ~2min + cmake -DGEN_FILES=On . + cmake --build . + tests/scripts/check-generated-files.sh + + msg "Check: check-generated-files -u, files present" # 2s + tests/scripts/check-generated-files.sh -u + # Check that the generated files are considered up to date. + tests/scripts/check-generated-files.sh + + # msg "Check: check-generated-files -u, files absent" # 2s + + cmake -DGEN_FILES=Off . + cmake --build . --clean-first + + tests/scripts/check-generated-files.sh -u + # Check that the generated files are considered up to date. + tests/scripts/check-generated-files.sh + + # This component ends with the generated files present in the source tree. + # This is necessary for subsequent components! +}