Support non existing XML logs for test result

If a test time out, it does not generate a XML output, so looking for
it would output an error. Ignore those entries.

Change-Id: I2d505274bdc9c6596168904b3aab4f551553b537
diff --git a/jenkins/lib/src/build/bazel/ci/BazelUtils.groovy b/jenkins/lib/src/build/bazel/ci/BazelUtils.groovy
index 8da3770..0fb7cb2 100644
--- a/jenkins/lib/src/build/bazel/ci/BazelUtils.groovy
+++ b/jenkins/lib/src/build/bazel/ci/BazelUtils.groovy
@@ -163,10 +163,13 @@
     def cp_lines = []
     events.each { event ->
       if("testResult" in event) {
-        def uri = URI.create(event.testResult.testActionOutput.find { it.name == "test.xml" }.uri)
-        def relativePath = uri.path.substring(uri.path.indexOf("/testlogs/") + 10)
-        cp_lines.add("mkdir -p \$(dirname '${test_folder}/${relativePath}')")
-        cp_lines.add("cp -r '${uri.path}' '${test_folder}/${relativePath}'")
+        def log = event.testResult.testActionOutput.find { it.name == "test.xml" }
+        if (log != null) {
+          def uri = URI.create(log.uri)
+          def relativePath = uri.path.substring(uri.path.indexOf("/testlogs/") + 10)
+          cp_lines.add("mkdir -p \$(dirname '${test_folder}/${relativePath}')")
+          cp_lines.add("cp -r '${uri.path}' '${test_folder}/${relativePath}'")
+        }
       }
     }
     return cp_lines.join('\n')