Skip to content

Commit

Permalink
Make the script work in both branches
Browse files Browse the repository at this point in the history
Signed-off-by: Elena Uziunaite <[email protected]>
  • Loading branch information
eleuzi01 committed Dec 5, 2024
1 parent 7ff29d6 commit dd342d5
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions scripts/check_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
except ImportError:
pass

import scripts_path # pylint: disable=unused-import
from mbedtls_framework import build_tree


Expand Down Expand Up @@ -367,9 +366,15 @@ class LicenseIssueTracker(LineIssueTracker):

heading = "License issue:"

LICENSE_EXEMPTION_RE_LIST = [
# Exempt third-party drivers which may be under a different license
r'tf-psa-crypto/drivers/(?=(everest)/.*)',
LICENSE_EXEMPTION_RE_LIST = []

# Exempt third-party drivers which may be under a different license
if build_tree.is_mbedtls_3_6():
LICENSE_EXEMPTION_RE_LIST.append(r'3rdparty/(?!(p256-m)/.*)')
else:
LICENSE_EXEMPTION_RE_LIST.append(r'tf-psa-crypto/drivers/(?=(everest)/.*)')

LICENSE_EXEMPTION_RE_LIST += [
# Documentation explaining the license may have accidental
# false positives.
r'(ChangeLog|LICENSE|framework\/LICENSE|[-0-9A-Z_a-z]+\.md)\Z',
Expand Down Expand Up @@ -486,9 +491,11 @@ def __init__(self, log_file):
TabIssueTracker(),
MergeArtifactIssueTracker(),
LicenseIssueTracker(),
ErrorAddIssueTracker(),
]

if not build_tree.is_mbedtls_3_6():
self.issues_to_check.append(ErrorAddIssueTracker())

def setup_logger(self, log_file, level=logging.INFO):
"""Log to log_file if provided, or to stderr if None."""
self.logger = logging.getLogger()
Expand Down

0 comments on commit dd342d5

Please sign in to comment.