Adding begin_time check for preflight crash check
To avoid reporting tombstone from previous boot,
providing a begin_time check for checking all crashes.
Test: Yes, locally
Bug: 67866326
Change-Id: Ia49cdcbf0e5a9b75068278fef7b63b5f8eb1e92b
diff --git a/acts/tests/google/tel/live/TelLivePreflightTest.py b/acts/tests/google/tel/live/TelLivePreflightTest.py
index 482cbbf..58c5495 100644
--- a/acts/tests/google/tel/live/TelLivePreflightTest.py
+++ b/acts/tests/google/tel/live/TelLivePreflightTest.py
@@ -113,9 +113,15 @@
@TelephonyBaseTest.tel_test_wrap
def test_check_crash(self):
result = True
+ begin_time = None
for ad in self.android_devices:
- ad.crash_report_preflight = ad.check_crash_report(
- self.test_name, None, True)
+ output = ad.search_logcat(
+ "processing action (sys.boot_completed=1)")
+ if output:
+ begin_time = output[-1]["time_stamp"][5:]
+ ad.log.debug("begin time is %s", begin_time)
+ ad.crash_report_preflight = ad.check_crash_report(self.test_name,
+ begin_time, True)
if ad.crash_report_preflight:
msg = "Find crash reports %s before test starts" % (
ad.crash_report_preflight)