ci.jpl: Only parse output.log when LAVA tests available

Jenkins should not try to parse output.log when there is no tests
submitted to LAVA. Because output.log will not be generated and finally
unexpected NoSuchFileException will be caused.

Signed-off-by: Xinyu Zhang <xinyu.zhang@arm.com>
Change-Id: I2faf0da5221cc377aeb8b1490df691e4d10b82fb
diff --git a/jenkins/ci.jpl b/jenkins/ci.jpl
index 03a3673..7835fd7 100644
--- a/jenkins/ci.jpl
+++ b/jenkins/ci.jpl
@@ -407,17 +407,19 @@
         //print(hudson.Functions.printThrowable(org.codehaus.groovy.runtime.StackTraceUtils.sanitize(e)))
         success = false
       } finally {
-        output = readFile("output.log")
-        println("--- output from lava_wait_jobs.py ---")
-        println(output)
-        println("--- end of output from lava_wait_jobs.py ---")
-        test_results = parseTestResults(output)
-        archiveArtifacts artifacts: 'test_summary.*', allowEmptyArchive: true
-        archiveArtifacts artifacts: 'cfgs/**', allowEmptyArchive: true
         if (all_jobs.size() > 0) {
-          emailNotification(success, 'test', test_results)
+          output = readFile("output.log")
+          println("--- output from lava_wait_jobs.py ---")
+          println(output)
+          println("--- end of output from lava_wait_jobs.py ---")
+          test_results = parseTestResults(output)
+          archiveArtifacts artifacts: 'test_summary.*', allowEmptyArchive: true
+          archiveArtifacts artifacts: 'cfgs/**', allowEmptyArchive: true
+          if (all_jobs.size() > 0) {
+            emailNotification(success, 'test', test_results)
+          }
+          verifyTestStatus(output)
         }
-        verifyTestStatus(output)
         cleanWs()
         if (!success) {
           error("There was an Error waiting for LAVA jobs")