Add infrastructure for arm_fpga platform into CI.
This patch adds all the scripts needed for CI to be able to
configure and run tests on the arm_fpga platform.
No run configurations are provided in this patch.
Change-Id: Id371794d1691b9f10d6bbf28bcfd11f9f5ea54e2
Signed-off-by: Javier Almansa Sobrino <javier.almansasobrino@arm.com>
diff --git a/script/build_package.sh b/script/build_package.sh
index da75a87..f373d58 100755
--- a/script/build_package.sh
+++ b/script/build_package.sh
@@ -196,6 +196,24 @@
' bash '{}' +
}
+# Map the UART ID used for expect with the UART descriptor and port
+# used by the FPGA automation tools.
+map_uart() {
+ local port="${port:?}"
+ local descriptor="${descriptor:?}"
+ local baudrate="${baudrate:?}"
+ local run_root="${archive:?}/run"
+
+ local uart_dir="$run_root/uart${uart:?}"
+ mkdir -p "$uart_dir"
+
+ echo "$port" > "$uart_dir/port"
+ echo "$descriptor" > "$uart_dir/descriptor"
+ echo "$baudrate" > "$uart_dir/baudrate"
+
+ echo "UART${uart} mapped to port ${port} with descriptor ${descriptor} and baudrate ${baudrate}"
+}
+
# Arrange environment varibles to be set when expect scripts are launched
set_expect_variable() {
local var="${1:?}"