| Index: build/android/pylib/instrumentation/test_runner.py
|
| diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py
|
| index 9473566b0a0434ff8fcb0778299fe10d3df5ab51..ae6fb831009eabe3cffd493d84ab9b3b22b5f136 100644
|
| --- a/build/android/pylib/instrumentation/test_runner.py
|
| +++ b/build/android/pylib/instrumentation/test_runner.py
|
| @@ -196,20 +196,21 @@ class TestRunner(base_test_runner.BaseTestRunner):
|
|
|
| self.tool.CleanUpEnvironment()
|
|
|
| - # The logic below relies on the test passing.
|
| - if not result or not result.DidRunPass():
|
| + if not result:
|
| return
|
| -
|
| - self.TearDownPerfMonitoring(test)
|
| -
|
| - if self.flags and self._IsFreTest(test):
|
| - self.flags.AddFlags(['--disable-fre'])
|
| -
|
| - if self.coverage_dir:
|
| - self.device.PullFile(
|
| - self.coverage_device_file, self.coverage_host_file)
|
| - self.device.RunShellCommand(
|
| - 'rm -f %s' % self.coverage_device_file)
|
| + if result.DidRunPass():
|
| + self.TearDownPerfMonitoring(test)
|
| +
|
| + if self.flags and self._IsFreTest(test):
|
| + self.flags.AddFlags(['--disable-fre'])
|
| +
|
| + if self.coverage_dir:
|
| + self.device.PullFile(
|
| + self.coverage_device_file, self.coverage_host_file)
|
| + self.device.RunShellCommand(
|
| + 'rm -f %s' % self.coverage_device_file)
|
| + elif self.package_info:
|
| + self.device.ClearApplicationState(self.package_info.package)
|
|
|
| def TearDownPerfMonitoring(self, test):
|
| """Cleans up performance monitoring if the specified test required it.
|
|
|