Fixing merge conflict errors

This should help LAVA job submissions amongst other areas.

Change-Id: I2e4b154ea63c30b38bc0d681adbe2416275170f0
diff --git a/jenkins/ci.jpl b/jenkins/ci.jpl
index c8d71e0..8744842 100644
--- a/jenkins/ci.jpl
+++ b/jenkins/ci.jpl
@@ -120,7 +120,14 @@
 
 def getResult(string, match) {
   line = lineInString(string, match)
-  return(line.split(match)[1].split(' '))
+  a = line.split(match)[1].split(' ')
+  score = a[0]
+  if (a.size() > 1)
+  {
+    fail_text = a[1..-1].join(" ")
+    return [score, fail_text]
+  }
+  return [score, ""]
 }
 
 def submitJobsToList(results) {
@@ -193,16 +200,16 @@
             archiveArtifacts artifacts: 'test_summary.*', allowEmptyArchive: true
             print(output)
             g = new Gerrit()
-            def boot_result = getResult(output, 'BOOT_RESULT: ')[0]
+            def (boot_result, boot_output) = getResult(output, 'BOOT_RESULT: ')
             if (boot_result) {
               g.verifyStatus(boot_result, "lava_boot", "test")
             }
-            def test_result = getResult(output, 'TEST_RESULT: ')[0]
+            def (test_result, test_output) = getResult(output, 'TEST_RESULT: ')
             if (test_result) {
               g.verifyStatus(test_result, "lava_test", "test")
             }
             if (boot_result.toInteger() < 1 || test_result.toInteger() < 1) {
-              error("Marking job as failed due to failed boots/tests")
+              error("Marking job as failed due to failed boots: ${boot_output} or tests: ${test_output}")
             }
           }
         }
diff --git a/lava_helper/jinja2_templates/mps2.jinja2 b/lava_helper/jinja2_templates/mps2.jinja2
index 870c95f..4f023b8 100644
--- a/lava_helper/jinja2_templates/mps2.jinja2
+++ b/lava_helper/jinja2_templates/mps2.jinja2
@@ -19,11 +19,10 @@
       recovery_image:
         url: {{ recovery_image_url }}
         compression: gz
-    namespace: target
-    test_binary_1:
-      url: {{ firmware_url}}
-    test_binary_2:
-      url: {{ bootloader_url }}
+      test_binary_1:
+        url: {{ firmware_url }}
+      test_binary_2:
+        url: {{ bootloader_url }}
     namespace: target
 
 - boot:
diff --git a/lava_helper/lava_helper_configs.py b/lava_helper/lava_helper_configs.py
index a3f507f..a902442 100644
--- a/lava_helper/lava_helper_configs.py
+++ b/lava_helper/lava_helper_configs.py
@@ -284,11 +284,7 @@
     "action_timeout": 10,
     "monitor_timeout": 10,
     "poweroff_timeout": 1,
-    "recovery_store_url": "%(jenkins_url)s/"
-                          "job/%(jenkins_job)s",
-    "artifact_store_url": "%(jenkins_url)s/"
-                          "job/%(jenkins_job)s",
-    "platforms": {"AN521": "mps2_an521_v3.0.tar.gz"},
+    "platforms": {"AN521": ""},
     "compilers": ["GNUARM", "ARMCLANG"],
     "build_types": ["Debug", "Release", "Minsizerel"],
     "boot_types": ["BL2"],
@@ -519,15 +515,12 @@
     "action_timeout": 10,
     "monitor_timeout": 10,
     "poweroff_timeout": 1,
-    "recovery_store_url": "%(jenkins_url)s/"
-                          "job/%(jenkins_job)s",
-    "artifact_store_url": "%(jenkins_url)s/"
-                          "job/%(jenkins_job)s",
-    "platforms": {"AN521": "mps2_an521_v3.0.tar.gz"},
+    "platforms": {"AN521": ""},
     "compilers": ["GNUARM", "ARMCLANG"],
     "build_types": ["Debug", "Release", "Minsizerel"],
     "boot_types": ["NOBL2"],
     "data_bin_offset": "0x00100000",
+    "cpu_baseline": 1,
     "tests": {
         'Default': {
             "binaries": {
diff --git a/tfm_ci_pylib/lava_rpc_connector.py b/tfm_ci_pylib/lava_rpc_connector.py
index d954d64..ac22774 100644
--- a/tfm_ci_pylib/lava_rpc_connector.py
+++ b/tfm_ci_pylib/lava_rpc_connector.py
@@ -179,9 +179,12 @@
             print(e)
             return None, None
         try:
-            job_id = self.scheduler.submit_job(job_data)
-            job_url = self.server_job_prefix % job_id
-            return(job_id, job_url)
+            if self.has_device_type(job_data):
+                job_id = self.scheduler.submit_job(job_data)
+                job_url = self.server_job_prefix % job_id
+                return(job_id, job_url)
+            else:
+                raise Exception("No devices online with required device_type")
         except Exception as e:
             print(e)
             return(None, None)