From ee6410c8e246c0379a1b1fecfc1a0bd336bdecd7 Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Mon, 11 Dec 2023 15:54:48 +0000 Subject: [PATCH 1/4] Add recursion.pl to scripts to be copied Signed-off-by: Thomas Daubney --- scripts/psa_crypto.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/psa_crypto.py b/scripts/psa_crypto.py index a9e72bf1b..74529e978 100755 --- a/scripts/psa_crypto.py +++ b/scripts/psa_crypto.py @@ -153,7 +153,8 @@ def copy_from_tests(mbedtls_root_path, psa_crypto_root_path): "generate_test_code.py|"\ "scripts_path.py|"\ "test_generate_test_code.py|"\ - "test_psa_compliance.py", + "test_psa_compliance.py|",\ + "recursion.pl", file_), os.listdir(scripts_source_path)) for file_ in scripts_files: shutil.copy2(os.path.join(scripts_source_path, file_), From fb98a0153d0168c9bacebf4b17c990ce6bcb77ec Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Mon, 11 Dec 2023 16:08:18 +0000 Subject: [PATCH 2/4] Add all.sh components Add components for check_recursion and check_test_cases. Signed-off-by: Thomas Daubney --- tests/all_sh_components.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/all_sh_components.txt b/tests/all_sh_components.txt index c29f2f107..8c2c3cb6f 100644 --- a/tests/all_sh_components.txt +++ b/tests/all_sh_components.txt @@ -206,3 +206,19 @@ component_test_cmake_shared () { cd "$TF_PSA_CRYPTO_ROOT_DIR" rm -rf "$OUT_OF_SOURCE_DIR" } + +component_check_recursion () { + msg "Check: recursion.pl" # < 1s + tests/scripts/recursion.pl library/*.c +} + +component_check_test_cases () { + msg "Check: test case descriptions" # < 1s + if [ $QUIET -eq 1 ]; then + opt='--quiet' + else + opt='' + fi + tests/scripts/check_test_cases.py -q $opt + unset opt +} \ No newline at end of file From 705940a7f8839a63d3edd37e358b9df603212138 Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Wed, 13 Dec 2023 10:13:30 +0000 Subject: [PATCH 3/4] Rename library for core in component_check_recursion Signed-off-by: Thomas Daubney --- tests/all_sh_components.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/all_sh_components.txt b/tests/all_sh_components.txt index 8c2c3cb6f..802f76ccd 100644 --- a/tests/all_sh_components.txt +++ b/tests/all_sh_components.txt @@ -209,7 +209,7 @@ component_test_cmake_shared () { component_check_recursion () { msg "Check: recursion.pl" # < 1s - tests/scripts/recursion.pl library/*.c + tests/scripts/recursion.pl core/*.c } component_check_test_cases () { From d15600a97805bad42d3f03f9ffba493b161b071e Mon Sep 17 00:00:00 2001 From: Thomas Daubney Date: Wed, 13 Dec 2023 13:14:58 +0000 Subject: [PATCH 4/4] Add check for drivers .c files too Signed-off-by: Thomas Daubney --- tests/all_sh_components.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/all_sh_components.txt b/tests/all_sh_components.txt index 802f76ccd..2a52b1f54 100644 --- a/tests/all_sh_components.txt +++ b/tests/all_sh_components.txt @@ -210,6 +210,7 @@ component_test_cmake_shared () { component_check_recursion () { msg "Check: recursion.pl" # < 1s tests/scripts/recursion.pl core/*.c + tests/scripts/recursion.pl drivers/builtin/src/*.c } component_check_test_cases () {