Merge pull request #9700 from ronald-cron-arm/test-psa-crypto-drivers
Enable PSA_CRYPTO_CONFIG in test_psa_crypto_drivers
diff --git a/scripts/code_style.py b/scripts/code_style.py
index ed9f7bc..26b691c 100755
--- a/scripts/code_style.py
+++ b/scripts/code_style.py
@@ -103,8 +103,10 @@
"--name-only", "--pretty=", "--"] + src_files
output = subprocess.check_output(cmd, universal_newlines=True)
committed_changed_files = output.split()
+
# ... the framework submodule
- cmd = ["git", "-C", "framework", "log", since + "..HEAD",
+ framework_since = get_submodule_hash(since, "framework")
+ cmd = ["git", "-C", "framework", "log", framework_since + "..HEAD",
"--name-only", "--pretty=", "--"] + framework_src_files
output = subprocess.check_output(cmd, universal_newlines=True,
env=framework_env)
@@ -137,6 +139,12 @@
is_file_autogenerated(filename))]
return src_files
+def get_submodule_hash(commit: str, submodule: str) -> str:
+ """Get the commit hash of a submodule at a given commit in the Git repository."""
+ cmd = ["git", "ls-tree", commit, submodule]
+ output = subprocess.check_output(cmd, universal_newlines=True)
+ return output.split()[2]
+
def get_uncrustify_version() -> str:
"""
Get the version string from Uncrustify