From 1e05debd607124c301f78fe772c6da78fc837f25 Mon Sep 17 00:00:00 2001 From: Ronald Cron Date: Thu, 25 Apr 2024 12:24:00 +0200 Subject: [PATCH] Extend basic checks of files to framework files Signed-off-by: Ronald Cron --- tests/scripts/check_files.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/scripts/check_files.py b/tests/scripts/check_files.py index d5a4b921e4..ea86439fbf 100755 --- a/tests/scripts/check_files.py +++ b/tests/scripts/check_files.py @@ -373,7 +373,7 @@ class LicenseIssueTracker(LineIssueTracker): r'3rdparty/(?!(p256-m)/.*)', # Documentation explaining the license may have accidental # false positives. - r'(ChangeLog|LICENSE|[-0-9A-Z_a-z]+\.md)\Z', + r'(ChangeLog|LICENSE|framework\/LICENSE|[-0-9A-Z_a-z]+\.md)\Z', # Files imported from TF-M, and not used except in test builds, # may be under a different license. r'configs/ext/crypto_config_profile_medium\.h\Z', @@ -381,6 +381,7 @@ class LicenseIssueTracker(LineIssueTracker): r'configs/ext/README\.md\Z', # Third-party file. r'dco\.txt\Z', + r'framework\/dco\.txt\Z', ] path_exemptions = re.compile('|'.join(BINARY_FILE_PATH_RE_LIST + LICENSE_EXEMPTION_RE_LIST)) @@ -486,7 +487,8 @@ class IntegrityChecker: These are the regular files commited into Git. """ - bytes_output = subprocess.check_output(['git', 'ls-files', '-z']) + bytes_output = subprocess.check_output(['git', 'ls-files', + '--recurse-submodules', '-z']) bytes_filepaths = bytes_output.split(b'\0')[:-1] ascii_filepaths = map(lambda fp: fp.decode('ascii'), bytes_filepaths) # Filter out directories. Normally Git doesn't list directories