Skip to content
Browse files
[FIXED JENKINS-9831] Clear emulator logs before creating first snapshot.
This prevents all the initial start-up logcat output from being
redundantly included in every subsequent build that uses this snapshot.
  • Loading branch information
orrc committed Jul 26, 2011
1 parent 06b8cb1 commit 0e9e7cc20aec4c08d9bbcceda218d835e2ca6b54
Showing 1 changed file with 9 additions and 0 deletions.
@@ -389,6 +389,15 @@ private Environment doSetUp(final AbstractBuild<?, ?> build, final Launcher laun
log(logger, Messages.WAITING_INITIAL_SNAPSHOT());
Thread.sleep((long) (bootDuration * 0.8));

// Clear main log before creating snapshot
final String clearArgs = String.format("-s %s logcat -c", serial);
ArgumentListBuilder adbCmd = Utils.getToolCommand(androidSdk, isUnix, Tool.ADB, clearArgs);
final String msg = "Creating snapshot...";
final String logArgs = String.format("-s %s shell log -p v -t Jenkins '%s'", serial, msg);
adbCmd = Utils.getToolCommand(androidSdk, isUnix, Tool.ADB, logArgs);

// Pause execution of the emulator
boolean stopped = sendEmulatorCommand(launcher, logger, userPort, "avd stop");
if (stopped) {

0 comments on commit 0e9e7cc

Please sign in to comment.