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>
diff --git a/expect/crash_passed_test.exp b/expect/crash_passed_test.exp
index b0e347c..d9907e3 100644
--- a/expect/crash_passed_test.exp
+++ b/expect/crash_passed_test.exp
@@ -11,4 +11,15 @@
 # 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