Only collect logcat once when re-running tests.

If instrumentation test run fails partway through, the remaining tests in
the run will be executed individually. This previously would result in a
separate logcat capture per test - which can add up fairly quickly.

This commit adds ability to control whether logcat is captured or not for a
instrumentation test run, and turns it off when re-running tests.

Change-Id: I2fa3d8c7c691f45ad726cfdc1fb488d1044e0152
4 files changed