refactor: move LAVA job definition templates into independent files

This change introduces a new script function to expand the variables in
a file. With this, we can move the LAVA YAML job template descriptions,
which are currently embedded inside individual HEREDOCs, into their own
files.

Signed-off-by: Chris Kay <chris.kay@arm.com>
Change-Id: I09805ab4b6894a371e63a944d113ca2f475a806b
diff --git a/script/gen_juno_scp_tests_scmi_yaml.sh b/script/gen_juno_scp_tests_scmi_yaml.sh
index 31fac79..9ce0461 100755
--- a/script/gen_juno_scp_tests_scmi_yaml.sh
+++ b/script/gen_juno_scp_tests_scmi_yaml.sh
@@ -37,59 +37,4 @@
         tags=""
 fi
 
-cat <<EOF
-device_type: juno
-job_name: scp-tests-scmi-juno
-
-$tags
-$juno_revision
-
-timeouts:
-  # Global timeout value for the whole job.
-  job:
-    minutes: 10
-  actions:
-    lava-test-monitor:
-      seconds: 180
-  connections:
-    lava-test-monitor:
-      seconds: 180
-
-priority: medium
-visibility: public
-
-actions:
-
-- deploy:
-    timeout:
-      minutes: 5
-    to: vemsd
-    recovery_image:
-      url: $recovery_img_url
-      compression: zip
-
-- boot:
-    method: minimal
-
-- test:
-    timeout:
-      minutes: 8
-
-    monitors:
-    #
-    # Monitor no.1
-    # Monitor the results from all the protocols
-    #
-    - name: SCP-SCMI-ALL-PROTOCOL
-      start: 'BL31: Baremetal test suite: scmi'
-      end: '\*\*\*\* SCMI tests complete \*\*\*\*'
-
-      pattern: '(?P<test_case_id>\d{3}):[\w ]+[\w\n\r[\] :<>&=]*?: (?P<result>CONFORMANT|NON CONFORMANT|SKIPPED)'
-
-      fixupdict:
-        "CONFORMANT": pass
-        "NON CONFORMANT": fail
-        "SKIPPED": skip
-
-
-EOF
+expand_template "$(dirname "$0")/lava-templates/juno-scp-tests-scmi.yaml"