Skip to content

Commit

Permalink
Change the way uncrustify config is added to project
Browse files Browse the repository at this point in the history
Commit removes the existing uncrustify config file
and adds it for copying in psa_crypto.py. This required
the creation of a new function in psa_crypto.py called
copy_from_root.

Signed-off-by: Thomas Daubney <[email protected]>
  • Loading branch information
tom-daubney-arm committed Dec 14, 2023
1 parent 453d48c commit 9da43fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 240 deletions.
240 changes: 0 additions & 240 deletions .uncrustify.cfg

This file was deleted.

11 changes: 11 additions & 0 deletions scripts/psa_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ def copy_of_mbedtls_headers(mbedtls_root_path, psa_crypto_root_path):
if os.path.isfile(os.path.join(source_path, "lms.h")):
shutil.copy2(os.path.join(source_path, "lms.h"), include_tf_psa_crypto_path)

def copy_from_root(mbedtls_root_path, psa_crypto_root_path):
source_path = mbedtls_root_path
destination_path = psa_crypto_root_path

root_files_to_copy = [".uncrustify.cfg"]

for file_ in root_files_to_copy:
shutil.copy2(os.path.join(source_path, file_), destination_path)


def copy_from_library(mbedtls_root_path, psa_crypto_root_path):
builtin_path = os.path.join(psa_crypto_root_path, "drivers", "builtin")
library_files = filter(lambda file_: not re.match(
Expand Down Expand Up @@ -296,6 +306,7 @@ def main():

copy_of_psa_headers(mbedtls_root_path, os.getcwd())
copy_of_mbedtls_headers(mbedtls_root_path, os.getcwd())
copy_from_root(mbedtls_root_path, os.getcwd())
copy_from_library(mbedtls_root_path, os.getcwd())
copy_from_scripts(mbedtls_root_path, os.getcwd())
copy_from_tests(mbedtls_root_path, os.getcwd())
Expand Down

0 comments on commit 9da43fa

Please sign in to comment.