Merge "Improve some of the messages to make them clearer"
diff --git a/src/com/android/tradefed/device/NativeDevice.java b/src/com/android/tradefed/device/NativeDevice.java
index e9a4359..0461d5e 100644
--- a/src/com/android/tradefed/device/NativeDevice.java
+++ b/src/com/android/tradefed/device/NativeDevice.java
@@ -2525,10 +2525,14 @@
                 return null;
             } else {
                 String remoteFilePath = match.group(2);
+                if (Strings.isNullOrEmpty(remoteFilePath)) {
+                    CLog.e("Invalid bugreportz path found from output: %s", output);
+                    return null;
+                }
                 File zipFile = null;
                 try {
                     if (!doesFileExist(remoteFilePath)) {
-                        CLog.e("Did not find bugreportz at: %s", remoteFilePath);
+                        CLog.e("Did not find bugreportz at: '%s'", remoteFilePath);
                         return null;
                     }
                     // Create a placeholder to replace the file
diff --git a/src/com/android/tradefed/result/CollectingTestListener.java b/src/com/android/tradefed/result/CollectingTestListener.java
index e12902a..d9ec6ec 100644
--- a/src/com/android/tradefed/result/CollectingTestListener.java
+++ b/src/com/android/tradefed/result/CollectingTestListener.java
@@ -219,7 +219,8 @@
                 result.testRunStarted(name, numTests, startTime);
                 String errorMessage =
                         String.format(
-                                "Run attempt %s of %s did not exists, but got attempt %s. This is a placeholder for the missing attempt.",
+                                "Run attempt %s of %s did not exists, but got attempt %s."
+                                        + " This is a placeholder for the missing attempt.",
                                 i, name, attemptNumber);
                 result.testRunFailed(errorMessage);
                 result.testRunEnded(0L, new HashMap<String, Metric>());
@@ -435,7 +436,10 @@
         if (mTestRunResultMap.isEmpty() && mCurrentTestRunResult.isRunFailure()) {
             // In case of early failure that is a bit untracked, still add it to the list to
             // not loose it.
-            CLog.e("Early failure resulting in no testRunStart. Results might be inconsistent.");
+            CLog.e(
+                    "Early failure resulting in no testRunStart. Results might be inconsistent:"
+                            + "\n%s",
+                    mCurrentTestRunResult.getRunFailureMessage());
             mMergedTestRunResults.add(mCurrentTestRunResult);
         } else {
             for (Entry<String, List<TestRunResult>> results : mTestRunResultMap.entrySet()) {