Skip to content
Snippets Groups Projects
Commit 45eae468 authored by Eric Rowe's avatar Eric Rowe
Browse files

Resume at "beginning of main"

Change-Id: Ib73fe8215bf5b9cf8cd6dd58c54eb481c38cc483
parent ca029177
No related branches found
No related tags found
No related merge requests found
......@@ -241,7 +241,7 @@ public class LogcatParser implements IParser {
Pattern.matches("Rebooting, reason: .*", msg)) {
mIsParsing = false;
}
if (Pattern.matches(".*--------- beginning of /dev/log/main", line)) {
if (Pattern.matches(".*--------- beginning of .*", line)) {
mIsParsing = true;
}
......
......@@ -607,6 +607,26 @@ public class LogcatParserTest extends TestCase {
assertEquals(parseTime("2012-04-25 09:59:47.799"), logcat.getStopTime());
assertEquals(1, logcat.getEvents().size());
assertEquals("java.lang.Exception2", logcat.getJavaCrashes().get(0).getException());
lines = Arrays.asList(
"04-25 09:15:47.799 123 3082 I ShutdownThread: Rebooting, reason: null",
"04-25 09:55:47.799 3064 3082 E AndroidRuntime: java.lang.Exception",
"04-25 09:55:47.799 3064 3082 E AndroidRuntime: \tat class.method1(Class.java:1)",
"04-25 09:55:47.799 3064 3082 E AndroidRuntime: \tat class.method2(Class.java:2)",
"04-25 09:55:47.799 3064 3082 E AndroidRuntime: \tat class.method3(Class.java:3)",
"logcat interrupted. May see duplicated content in log.--------- beginning of main",
"04-25 09:59:47.799 3064 3082 E AndroidRuntime: java.lang.Exception2",
"04-25 09:59:47.799 3064 3082 E AndroidRuntime: \tat class.method1(Class.java:1)",
"04-25 09:59:47.799 3064 3082 E AndroidRuntime: \tat class.method2(Class.java:2)",
"04-25 09:59:47.799 3064 3082 E AndroidRuntime: \tat class.method3(Class.java:3)");
logcat = new LogcatParser("2012").parse(lines);
assertNotNull(logcat);
assertEquals(parseTime("2012-04-25 09:15:47.799"), logcat.getStartTime());
assertEquals(parseTime("2012-04-25 09:59:47.799"), logcat.getStopTime());
assertEquals(1, logcat.getEvents().size());
assertEquals("java.lang.Exception2", logcat.getJavaCrashes().get(0).getException());
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment