Merge "More logging for LogEventChecker appearing to skip events" into ub-launcher3-rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
dfd8c4806f
@@ -79,6 +79,7 @@ public class LogEventChecker {
|
|||||||
final String id = UUID.randomUUID().toString();
|
final String id = UUID.randomUUID().toString();
|
||||||
mStartCommand = START_PREFIX + id;
|
mStartCommand = START_PREFIX + id;
|
||||||
mFinishCommand = FINISH_PREFIX + id;
|
mFinishCommand = FINISH_PREFIX + id;
|
||||||
|
Log.d(SKIP_EVENTS_TAG, "Expected finish command: " + mFinishCommand);
|
||||||
Log.d(TestProtocol.TAPL_EVENTS_TAG, mStartCommand);
|
Log.d(TestProtocol.TAPL_EVENTS_TAG, mStartCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,8 +96,7 @@ public class LogEventChecker {
|
|||||||
// Skip everything before the next start command.
|
// Skip everything before the next start command.
|
||||||
for (; ; ) {
|
for (; ; ) {
|
||||||
final String event = reader.readLine();
|
final String event = reader.readLine();
|
||||||
if (event.contains(TestProtocol.TAPL_EVENTS_TAG)
|
if (event.contains(mStartCommand)) {
|
||||||
&& event.contains(mStartCommand)) {
|
|
||||||
Log.d(SKIP_EVENTS_TAG, "Read start: " + event);
|
Log.d(SKIP_EVENTS_TAG, "Read start: " + event);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -105,18 +105,18 @@ public class LogEventChecker {
|
|||||||
// Store all actual events until the finish command.
|
// Store all actual events until the finish command.
|
||||||
for (; ; ) {
|
for (; ; ) {
|
||||||
final String event = reader.readLine();
|
final String event = reader.readLine();
|
||||||
if (event.contains(TestProtocol.TAPL_EVENTS_TAG)) {
|
if (event.contains(mFinishCommand)) {
|
||||||
if (event.contains(mFinishCommand)) {
|
mFinished.countDown();
|
||||||
mFinished.countDown();
|
Log.d(SKIP_EVENTS_TAG, "Read finish: " + event);
|
||||||
Log.d(SKIP_EVENTS_TAG, "Read finish: " + event);
|
break;
|
||||||
break;
|
} else {
|
||||||
|
final Matcher matcher = EVENT_LOG_ENTRY.matcher(event);
|
||||||
|
if (matcher.find()) {
|
||||||
|
mEvents.add(matcher.group("sequence"), matcher.group("event"));
|
||||||
|
Log.d(SKIP_EVENTS_TAG, "Read event: " + event);
|
||||||
|
mEventsCounter.release();
|
||||||
} else {
|
} else {
|
||||||
final Matcher matcher = EVENT_LOG_ENTRY.matcher(event);
|
Log.d(SKIP_EVENTS_TAG, "Read something unexpected: " + event);
|
||||||
if (matcher.find()) {
|
|
||||||
mEvents.add(matcher.group("sequence"), matcher.group("event"));
|
|
||||||
Log.d(SKIP_EVENTS_TAG, "Read event: " + event);
|
|
||||||
mEventsCounter.release();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user