feat(gpt): add ci support to test using backup-gpt

Current GPT test uses the primary GPT header, so corrupt primary GPT
header at second LBA after the MBR. This would force it to use the
backup-gpt header at last LBA.

Also additional changes done to handle backup_gpt header to TF-A
causes BL31 to run out of space so add FVP_TRUSTED_SRAM_SIZE=384
to gpt builds.

Change-Id: I6660a5e3c533f58738272302c8008c88dd82b8a6
Signed-off-by: Govindraj Raja <govindraj.raja@arm.com>
diff --git a/expect/backup_gpt.exp b/expect/backup_gpt.exp
new file mode 100644
index 0000000..f455321
--- /dev/null
+++ b/expect/backup_gpt.exp
@@ -0,0 +1,15 @@
+#
+# Copyright (c) 2023 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Expect script for Trusted Firmware Test Framework
+#
+
+source [file join [file dirname [info script]] handle-arguments.inc]
+
+expect_string "Trying to retrieve back-up GPT header"
+
+source [file join [file dirname [info script]] tftf.inc]
+
+exit_uart -1
diff --git a/expect/tftf.exp b/expect/tftf.exp
index 161c171..f14b00a 100644
--- a/expect/tftf.exp
+++ b/expect/tftf.exp
@@ -10,22 +10,6 @@
 
 source [file join [file dirname [info script]] trusted-firmware.inc]
 
-expect_string "Booting trusted firmware test framework" "TFTF is booting"
-expect_re "Running at NS-EL(1|2)"
-
-expect {
-	"Tests Failed  : 0" {
-		expect_string "Exiting tests." "all TFTF tests passed"
-		exit_uart 0
-	}
-	"Tests Passed  : 0" {
-		expect_string "Exiting tests." "no TFTF tests passed"
-		exit_uart -1
-	}
-	-re "Tests Failed  : \[^0]" {
-		expect_string "Exiting tests." "one or more TFTF tests failed"
-		exit_uart -1
-	}
-}
+source [file join [file dirname [info script]] tftf.inc]
 
 exit_uart -1
diff --git a/expect/tftf.inc b/expect/tftf.inc
new file mode 100644
index 0000000..2b671fd
--- /dev/null
+++ b/expect/tftf.inc
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2023 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+# Expect script for Trusted Firmware Test Framework
+#
+
+expect_string "Booting trusted firmware test framework" "TFTF is booting"
+
+expect_re "Running at NS-EL(1|2)"
+
+expect {
+	"Tests Failed  : 0" {
+		expect_string "Exiting tests." "all TFTF tests passed"
+		exit_uart 0
+	}
+	"Tests Passed  : 0" {
+		expect_string "Exiting tests." "no TFTF tests passed"
+		exit_uart -1
+	}
+	-re "Tests Failed  : \[^0]" {
+		expect_string "Exiting tests." "one or more TFTF tests failed"
+		exit_uart -1
+	}
+}