Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add component for check_generated_files testing #91

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/psa_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
24 changes: 24 additions & 0 deletions tests/all_sh_components.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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!
}