fix: fix FTPM test expectations on OpenCI
The expectations for the FTPM tests need to run in an explicit order
because of an implicit dependency between two UART expectations. This
change reorders the port numbering to enforce that order.
Signed-off-by: Chris Kay <chris.kay@arm.com>
Change-Id: Idc264bcc19ea71e23622979b3750ed334a3f1004
(cherry picked from commit 07756bc04502128d9d933860b999f87cdeada8b9)
diff --git a/expect/linux-tpm.exp b/expect/linux-tpm.exp
index 6783503..8aff8ce 100644
--- a/expect/linux-tpm.exp
+++ b/expect/linux-tpm.exp
@@ -88,19 +88,14 @@
}
}
+expect_string "#" "finished reading PCRs"
+
# Match the previously stored digest with the one generated by the
# fTPM service. The pass criteria is that both digests must match,
# meaning that TF-A successfully passed the event log to the TPM service.
-expect {
- "#" {
- spawn diff -s $TFA_DIGEST ftpm_event_log
- }
+if {[catch {exec diff -s $TFA_DIGEST ftpm_event_log} result options] == 0} {
+ message "tests succeeded, digests matched"
+} else {
+ message "tests failed, digests did not match"
+ exit_uart -1
}
-
-expect {
- -exact "are identical" {
- exit_uart 0
- }
-}
-
-exit_uart -1