Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1159)

Unified Diff: build/android/pylib/local/device/local_device_instrumentation_test_run.py

Issue 1034053002: [Android] Add an out-of-app instrumentation driver APK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/local/device/local_device_instrumentation_test_run.py
diff --git a/build/android/pylib/local/device/local_device_instrumentation_test_run.py b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
index ac3f5b177a8afa463902b528eacf839f59ff2760..294e8ac4cd5f86625fab0981d27c65c35c43b68c 100644
--- a/build/android/pylib/local/device/local_device_instrumentation_test_run.py
+++ b/build/android/pylib/local/device/local_device_instrumentation_test_run.py
@@ -104,15 +104,25 @@ class LocalDeviceInstrumentationTestRun(
#override
def _RunTest(self, device, test):
- test_name = self._GetTestName(test)
+ if isinstance(test, list):
+ def name_and_timeout(t):
+ n = self._GetTestName(t)
+ i = self._GetTimeoutFromAnnotations(t['annotations'], n)
+ return (n, i)
+
+ test_names, timeouts = zip(*(name_and_timeout(t) for t in test))
+ test_name = ','.join(test_names)
+ timeout = sum(timeouts)
+ else:
+ test_name = self._GetTestName(test)
+ timeout = self._GetTimeoutFromAnnotations(test['annotatoins'], test_name)
+
logging.info('preparing to run %s: %s' % (test_name, test))
extras = {
- 'class': test_name,
- 'org.chromium.chrome.test.ChromeInstrumentationTestRunner'
- '.EnableTestHttpServer': '',
+ 'class': test_name
}
- timeout = self._GetTimeoutFromAnnotations(test['annotations'], test_name)
+ extras.update(self._test_instance.GetHttpServerEnvironmentVars())
time_ms = lambda: int(time.time() * 1e3)
start_ms = time_ms()

Powered by Google App Engine
This is Rietveld 408576698