Skip the empty tombstone file in check_crash_report.
Skip RAMDUMP_OUTPUT file in check_crash_report.
Test: run ACTS test
Bug: 68347082
Change-Id: I25e8c5b6ca23c90b967d47640596ec63736da055
diff --git a/acts/framework/acts/controllers/android_device.py b/acts/framework/acts/controllers/android_device.py
index 5a6bf0e..2707d03 100755
--- a/acts/framework/acts/controllers/android_device.py
+++ b/acts/framework/acts/controllers/android_device.py
@@ -48,7 +48,8 @@
CRASH_REPORT_PATHS = ("/data/tombstones/", "/data/vendor/ramdump/",
"/data/ramdump/", "/data/vendor/ssrdump",
"/data/vendor/ramdump/bluetooth")
-CRASH_REPORT_SKIPS = ("RAMDUMP_RESERVED", "RAMDUMP_STATUS", "bluetooth")
+CRASH_REPORT_SKIPS = ("RAMDUMP_RESERVED", "RAMDUMP_STATUS", "RAMDUMP_OUTPUT",
+ "bluetooth")
BUG_REPORT_TIMEOUT = 1800
PULL_TIMEOUT = 300
PORT_RETRY_COUNT = 3
@@ -993,11 +994,19 @@
"""check crash report on the device."""
crash_reports = []
for crash_path in CRASH_REPORT_PATHS:
- crash_reports.extend(
- self.get_file_names(
- crash_path,
- begin_time=begin_time,
- skip_files=CRASH_REPORT_SKIPS))
+ crashes = self.get_file_names(
+ crash_path,
+ begin_time=begin_time,
+ skip_files=CRASH_REPORT_SKIPS)
+ if crash_path == "/data/tombstones/" and crashes:
+ tombstones = crashes[:]
+ for tombstone in tombstones:
+ if self.adb.shell(
+ 'cat %s | grep "crash_dump failed to dump process"'
+ % tombstone):
+ crashes.remove(tombstone)
+ if crashes:
+ crash_reports.extend(crashes)
if crash_reports and log_crash_report:
test_name = test_name or begin_time or time.strftime(
"%m-%d-%Y-%H-%M-%S")