mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-10-16 13:47:23 +00:00
Make the script work in both branches
Signed-off-by: Elena Uziunaite <[email protected]>
This commit is contained in:
+12
-5
@@ -23,7 +23,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
import scripts_path # pylint: disable=unused-import
|
|
||||||
from mbedtls_framework import build_tree
|
from mbedtls_framework import build_tree
|
||||||
|
|
||||||
|
|
||||||
@@ -369,9 +368,15 @@ class LicenseIssueTracker(LineIssueTracker):
|
|||||||
|
|
||||||
heading = "License issue:"
|
heading = "License issue:"
|
||||||
|
|
||||||
LICENSE_EXEMPTION_RE_LIST = [
|
LICENSE_EXEMPTION_RE_LIST = []
|
||||||
# Exempt third-party drivers which may be under a different license
|
|
||||||
r'tf-psa-crypto/drivers/(?=(everest)/.*)',
|
# 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
|
# Documentation explaining the license may have accidental
|
||||||
# false positives.
|
# false positives.
|
||||||
r'(ChangeLog|LICENSE|framework\/LICENSE|[-0-9A-Z_a-z]+\.md)\Z',
|
r'(ChangeLog|LICENSE|framework\/LICENSE|[-0-9A-Z_a-z]+\.md)\Z',
|
||||||
@@ -488,9 +493,11 @@ class IntegrityChecker:
|
|||||||
TabIssueTracker(),
|
TabIssueTracker(),
|
||||||
MergeArtifactIssueTracker(),
|
MergeArtifactIssueTracker(),
|
||||||
LicenseIssueTracker(),
|
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):
|
def setup_logger(self, log_file, level=logging.INFO):
|
||||||
"""Log to log_file if provided, or to stderr if None."""
|
"""Log to log_file if provided, or to stderr if None."""
|
||||||
self.logger = logging.getLogger()
|
self.logger = logging.getLogger()
|
||||||
|
|||||||
Reference in New Issue
Block a user