New issue
Advanced search Search tips

Issue 682391 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: ----



Sign in to add a comment

Log start/end markers for gtests on Android

Project Member Reported by tedc...@chromium.org, Jan 18 2017

Issue description

To make it easier to debug failing gtests, it would be great if the test runner would print out

START - TestName
END   - TestName

Around each test.  Then we can look for failures in a particular range of log.
 
The trick with this as opposed to instrumentation tests is that the python side of the test runner never knows when an individual test starts and ends, and the java side usually doesn't, either. We can print at the beginning and end of the entire shard, though, which I guess would still be an improvement?
In this context, what is a shard?

Do we know at what place is aware of what test is being run?  Is it only in the gtest framework?  I think if we could find a place and only reliably print the start marker, that would be a fine place to begin as well (since I assume native is toast in a crashed test case).
A shard is a group of up to 256 tests. They are run in a single invocation of the test suite. We chunk them to allow for more efficient use of connected devices. (256 is arbitrary; we want as large a number as we can while maintaining roughly even use of all devices.)

I think gtest internals are the outermost layer that knows when exactly a single test is running. We do still get the stdout, though, so the test runner can tell after the fact what completed / timed out / didn't run, but that doesn't help for putting bounds in the logcat.
example of logcat w/ full shard boundary logging
events_unittests.logcat.txt
187 KB View Download

Sign in to add a comment