n1sdp: Add support for n1sdp in ci
Build scp and tf-a and test the artefacts on n1sdp in LAVA.
Change-Id: Iabe1bc65c5eb18f3204ec732fa259e7e6a4351bc
Signed-off-by: Khasim Syed Mohammed <khasim.mohammed@arm.com>
diff --git a/job/tf-worker/is_n1sdp_config.sh b/job/tf-worker/is_n1sdp_config.sh
new file mode 100755
index 0000000..cc3a988
--- /dev/null
+++ b/job/tf-worker/is_n1sdp_config.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2021 Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+set -e
+
+# For n1sdp runs, we need to let the board download build artefacts using a URL.
+# The only way to have a board-accessible URL at the moment is to have build
+# artefacts archived. Therefore, for n1sdp we spawn the build as a separate job
+if echo "$RUN_CONFIG" | grep -iqe '^n1sdp'; then
+ exit 0
+else
+ exit 1
+fi
diff --git a/job/tf-worker/run_lava.py b/job/tf-worker/run_lava.py
index d0c2f87..47e99eb 100644
--- a/job/tf-worker/run_lava.py
+++ b/job/tf-worker/run_lava.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# Copyright (c) 2019-2020 Arm Limited. All rights reserved.
+# Copyright (c) 2019-2021 Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
@@ -58,6 +58,20 @@
if __name__ == "__main__":
+
+ # To deploy and boot the artefacts on a board in LAVA a platform specific
+ # yaml file should be dispatched to LAVA. The below logic will identify
+ # the name of the yaml file at run time for the platform defined in run_cfg.
+ platform_list = ['n1sdp', 'juno']
+
+ run_cfg = os.environ["RUN_CONFIG"]
+ res = [i for i in platform_list if i in run_cfg]
+ if res:
+ platform_yaml=''.join(res)+'.yaml'
+ else:
+ logging.critical("Exiting: Platform not found for LAVA in run-config %s", os.environ["RUN_CONFIG"])
+ sys.exit(-1)
+
parser = argparse.ArgumentParser(
description="Lava job runner with infrastructure error dectection and retry."
)
@@ -70,7 +84,7 @@
parser.add_argument(
"job",
nargs="?",
- default=os.path.join("artefacts", os.environ["BIN_MODE"], "juno.yaml"),
+ default=os.path.join("artefacts", os.environ["BIN_MODE"], platform_yaml),
help="the Lava job description file",
)
parser.add_argument(