feat(ci): Measured boot hash verification scripts
Move away from dependency on external fTPM and OP-TEE binaries through
using our own scripts to validate the hashes in the TF-A event log
during measured boot tests.
Change-Id: Ifd1fa8ce7d2091510b4c8242e25438e4d9aa61bb
Signed-off-by: Slava Andrianov <slava.andrianov@arm.com>
diff --git a/expect/compare_hashes.inc b/expect/compare_hashes.inc
new file mode 100644
index 0000000..4e9c358
--- /dev/null
+++ b/expect/compare_hashes.inc
@@ -0,0 +1,21 @@
+#
+# Copyright (c) 2025 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Expect script for monitoring the results of the TFA event log hash
+# verification script
+#
+
+set mismatched_marker "Mismatched"
+set missing_marker "not found"
+
+set compare_hash_path $env(ci_root)
+append compare_hash_path "/script/verify_hashes.py"
+
+set hash_verification_output [exec python3 $compare_hash_path 2>@1]
+puts $hash_verification_output
+if {[regexp $mismatched_marker|$missing_marker $hash_verification_output]} {
+ message "Hash mismatch or missing hash detected"
+ exit_uart -1
+}