From 98193241c391f45566ed1fdee89bfd3054c841ed Mon Sep 17 00:00:00 2001 From: vadimt Date: Thu, 25 Jul 2019 15:15:30 -0700 Subject: Tuning system health diags Change-Id: Ib437c07e7e6e766621af435f75198b55dafd13c4 --- tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java | 6 ++++-- tests/tapl/com/android/launcher3/tapl/TestHelpers.java | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java index f91e2ada7..fe7401ca6 100644 --- a/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java +++ b/tests/tapl/com/android/launcher3/tapl/LauncherInstrumentation.java @@ -331,8 +331,10 @@ public final class LauncherInstrumentation { final String systemHealth = getSystemHealthMessage(); if (systemHealth != null) { - message = message + ", which might be a consequence of system health problems:\n<<<\n" - + systemHealth + "\n>>>"; + message = message + + ", which might be a consequence of system health " + + "problems:\n<<<<<<<<<<<<<<<<<<\n" + + systemHealth + "\n>>>>>>>>>>>>>>>>>>"; } log("Hierarchy dump for: " + message); diff --git a/tests/tapl/com/android/launcher3/tapl/TestHelpers.java b/tests/tapl/com/android/launcher3/tapl/TestHelpers.java index ebe5eac5f..399c59d36 100644 --- a/tests/tapl/com/android/launcher3/tapl/TestHelpers.java +++ b/tests/tapl/com/android/launcher3/tapl/TestHelpers.java @@ -109,6 +109,7 @@ public class TestHelpers { DropBoxManager.Entry entry; StringBuilder errorDetails = new StringBuilder(); while (null != (entry = dropbox.getNextEntry(label, timestamp))) { + if (errorDetails.length() != 0) errorDetails.append("------------------------------"); timestamp = entry.getTimeMillis(); errorDetails.append(new Date(timestamp)); errorDetails.append(": "); @@ -135,7 +136,6 @@ public class TestHelpers { "system_server_crash", "system_server_native_crash", "system_server_watchdog", - "system_server_wtf", }; for (String label : labels) { @@ -143,7 +143,9 @@ public class TestHelpers { if (crash != null) errors.append(crash); } - return errors.length() != 0 ? errors.toString() : null; + return errors.length() != 0 + ? "Current time: " + new Date(System.currentTimeMillis()) + "\n" + errors + : null; } catch (Exception e) { return "Failed to get system health diags, maybe build your test via .bp instead of " + ".mk? " + android.util.Log.getStackTraceString(e); -- cgit v1.2.3