Revert "Revert "FVP Linux and TFTF YAML Support""

This reverts commit a2946b2b5d0b3b9daa7ede0780ee4c535f637122.

Signed-off-by: Leonardo Sandoval <leonardo.sandoval@linaro.org>
Change-Id: I44c9b346b5548cc961f88eb40ce723943e66f2d0
diff --git a/script/gen_fvp_linux_yaml.sh b/script/gen_fvp_linux_yaml.sh
new file mode 100755
index 0000000..7cf1315
--- /dev/null
+++ b/script/gen_fvp_linux_yaml.sh
@@ -0,0 +1,63 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2019, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# Generate a FVP-Linux model agnostic YAML template. Note that this template is not ready to be
+# sent to LAVA by Jenkins so in order to produce file, variables in ${UPPERCASE} must be replaced
+# to correct values
+
+cat <<EOF
+device_type: fvp
+job_name: tf-fvp
+
+timeouts:
+  connection:
+    minutes: 3
+  job:
+    minutes: 10
+  actions:
+    auto-login-action:
+      minutes: 5
+    http-download:
+      minutes: 2
+    download-retry:
+      minutes: 2
+    fvp-deploy:
+      minutes: 5
+
+priority: medium
+visibility: public
+
+actions:
+- deploy:
+    to: fvp
+    images:
+      bl1:
+        url: \${ACTIONS_DEPLOY_IMAGES_BL1}
+      fip:
+        url: \${ACTIONS_DEPLOY_IMAGES_FIP}
+      dtb:
+        url: \${ACTIONS_DEPLOY_IMAGES_DTB}
+      image:
+        url: \${ACTIONS_DEPLOY_IMAGES_IMAGE}
+      ramdisk:
+        url: \${ACTIONS_DEPLOY_IMAGES_RAMDISK}
+
+- boot:
+    method: fvp
+    docker:
+      name: \${BOOT_DOCKER_NAME}
+      local: true
+    image: \${BOOT_IMAGE}
+    version_string: \${BOOT_VERSION_STRING}
+    timeout:
+      minutes: 7
+    console_string: 'terminal_0: Listening for serial connection on port (?P<PORT>\d+)'
+    arguments:
+\${BOOT_ARGUMENTS}
+    prompts:
+    - '/ #'
+EOF
diff --git a/script/gen_fvp_tftf_yaml.sh b/script/gen_fvp_tftf_yaml.sh
new file mode 100755
index 0000000..56b10ad
--- /dev/null
+++ b/script/gen_fvp_tftf_yaml.sh
@@ -0,0 +1,78 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2019, Arm Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+# Generate a FVP-TFTF model agnostic YAML template. Note that this template is not ready to be
+# sent to LAVA by Jenkins so in order to produce file, variables in ${UPPERCASE} must be replaced
+# to correct values
+
+cat <<EOF
+device_type: fvp
+job_name: tf-fvp
+
+timeouts:
+  connection:
+    minutes: 3
+  job:
+    minutes: 10
+  actions:
+    auto-login-action:
+      minutes: 5
+    http-download:
+      minutes: 2
+    download-retry:
+      minutes: 2
+    fvp-deploy:
+      minutes: 5
+
+priority: medium
+visibility: public
+
+actions:
+- deploy:
+    to: fvp
+    images:
+      bl1:
+        url: \${ACTIONS_DEPLOY_IMAGES_BL1}
+      fip:
+        url: \${ACTIONS_DEPLOY_IMAGES_FIP}
+      ns_bl1u:
+        url: \${ACTIONS_DEPLOY_IMAGES_NS_BL1U}
+      ns_bl2u:
+        url: \${ACTIONS_DEPLOY_IMAGES_NS_BL2U}
+
+- boot:
+    method: fvp
+    docker:
+      name: \${BOOT_DOCKER_NAME}
+      local: true
+    image: \${BOOT_IMAGE}
+    version_string: \${BOOT_VERSION_STRING}
+    timeout:
+      minutes: 30
+
+    monitors:
+    - name: TFTF
+      # LAVA looks for a testsuite start string...
+      start: 'Booting trusted firmware test framework'
+      # ...and a testsuite end string.
+      end: 'Exiting tests.'
+
+      # For each test case, LAVA looks for a string which includes the testcase
+      # name and result.
+      pattern: "(?s)> Executing '(?P<test_case_id>.+?(?='))'(.*)  TEST COMPLETE\\\s+(?P<result>(Skipped|Passed|Failed|Crashed))"
+
+      # Teach to LAVA how to interpret the TFTF Tests results.
+      fixupdict:
+        Passed: pass
+        Failed: fail
+        Crashed: fail
+        Skipped: skip
+
+    arguments:
+\${BOOT_ARGUMENTS}
+
+EOF