Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void AssertHasDevices (bool fail = true)
public void DeviceSetup ()
{
SetAdbLogcatBufferSize (64);
RunAdbCommand ("logcat -c");
ClearAdbLogcat ();
CreateGuestUser (GuestUserName);
}

Expand All @@ -69,6 +69,9 @@ public void CheckDevice ()
TestContext.Out.WriteLine ($"{nameof(CheckDevice)} is restarting the emulator.");
RestartDevice (Path.Combine (Root, "Emulator.csproj"));
}

// We want to start with a clean logcat buffer for each test
ClearAdbLogcat ();
}

[TearDown]
Expand All @@ -82,6 +85,9 @@ protected override void CleanupTest ()
string remote = "/data/local/tmp/screenshot.png";
string localUi = Path.Combine (outputDir, "ui.xml");
RunAdbCommand ($"shell screencap {remote}");

// Give the app a chance to finish logging
WaitFor (1000);
var output = RunAdbCommand ($"logcat -d");
File.WriteAllText (deviceLog, output);
RunAdbCommand ($"pull {remote} \"{local}\"");
Expand Down