Index: build/android/pylib/uiautomator/test_runner.py |
diff --git a/build/android/pylib/uiautomator/test_runner.py b/build/android/pylib/uiautomator/test_runner.py |
index 794c313d4324479813b0b625326c31c58a6c52bf..fa0725d34a48f2979abedd7354de75ad07cf2299 100644 |
--- a/build/android/pylib/uiautomator/test_runner.py |
+++ b/build/android/pylib/uiautomator/test_runner.py |
@@ -74,5 +74,13 @@ class TestRunner(instr_test_runner.TestRunner): |
package=self._package), |
blocking=True, |
force_stop=True) |
- return self.device.old_interface.RunUIAutomatorTest( |
- test, self.test_pkg.GetPackageName(), timeout) |
+ cmd = ['uiautomator', 'runtest', self.test_pkg.GetPackageName(), |
+ '-e', 'class', test] |
+ return self.device.RunShellCommand(cmd, timeout=timeout, retries=0) |
+ |
+ #override |
+ def _GenerateTestResult(self, test, instr_statuses, start_ms, duration_ms): |
+ # uiautomator emits its summary status with INSTRUMENTATION_STATUS_CODE, |
+ # not INSTRUMENTATION_CODE, so we have to drop if off the list of statuses. |
+ return super(TestRunner, self)._GenerateTestResult( |
+ test, instr_statuses[:-1], start_ms, duration_ms) |