diff options
author | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2023-05-05 16:06:51 +0200 |
---|---|---|
committer | Sandrine Bailleux <sandrine.bailleux@arm.com> | 2023-05-16 13:03:34 +0200 |
commit | 28566d93d1a3c13a817f8a94fbe681af3c42ce52 (patch) | |
tree | f3d3e1fdc175398e68182f5d22d064ed2eec6f39 | |
parent | efabfc8eebe5a43a4f201ea1543378f3ba3eed2d (diff) |
tc: revisit expect script for platform tests
In line with the changes done in TF-A to unify messages printed by the
different sets of platform tests, rework their expect script to:
- "Expect" the new strings.
- Return an exit code based on the outcome of the tests
(0 for success, -1 for failure).
This last point makes the test configurations utilizing this expect
script more robust to tests failures. Where previously they would have
indefinitely waited for a "Passed nv_counter_test" string that would
never be seen, thus causing the CI job to time out, they will now
detect the test failure early and terminate the CI job.
Change-Id: I3f52a87711900cd3f3465c4dc84982176ef184cc
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
-rw-r--r-- | expect/crash_passed_test.exp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/expect/crash_passed_test.exp b/expect/crash_passed_test.exp index b0e347cc..d9907e33 100644 --- a/expect/crash_passed_test.exp +++ b/expect/crash_passed_test.exp @@ -11,4 +11,15 @@ source [file join [file dirname [info script]] handle-arguments.inc] # Trusted Firmware boot section source [file join [file dirname [info script]] trusted-firmware.inc] -expect_string "Passed nv_counter_test" +expect_string "Starting platform tests..." + +expect { + "Platform tests failed." { + exit_uart -1 + } + "Platform tests succeeded." { + exit_uart 0 + } +} + +exit_uart -1 |