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

Side by Side Diff: build/android/pylib/local/device/local_device_instrumentation_test_run.py

Issue 1218053003: [Android] Begin switching from lighttpd + apache to EmbeddedTestServer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import re 6 import re
7 import time 7 import time
8 8
9 from pylib import flag_changer 9 from pylib import flag_changer
10 from pylib.base import base_test_result 10 from pylib.base import base_test_result
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 #override 123 #override
124 def _GetTests(self): 124 def _GetTests(self):
125 return self._test_instance.GetTests() 125 return self._test_instance.GetTests()
126 126
127 #override 127 #override
128 def _GetTestName(self, test): 128 def _GetTestName(self, test):
129 return '%s#%s' % (test['class'], test['method']) 129 return '%s#%s' % (test['class'], test['method'])
130 130
131 #override 131 #override
132 def _RunTest(self, device, test): 132 def _RunTest(self, device, test):
133 extras = self._test_instance.GetHttpServerEnvironmentVars() 133 extras = {}
134 134
135 if isinstance(test, list): 135 if isinstance(test, list):
136 if not self._test_instance.driver_apk: 136 if not self._test_instance.driver_apk:
137 raise Exception('driver_apk does not exist. ' 137 raise Exception('driver_apk does not exist. '
138 'Please build it and try again.') 138 'Please build it and try again.')
139 139
140 def name_and_timeout(t): 140 def name_and_timeout(t):
141 n = self._GetTestName(t) 141 n = self._GetTestName(t)
142 i = self._GetTimeoutFromAnnotations(t['annotations'], n) 142 i = self._GetTimeoutFromAnnotations(t['annotations'], n)
143 return (n, i) 143 return (n, i)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 try: 199 try:
200 scale = int(annotations.get('TimeoutScale', 1)) 200 scale = int(annotations.get('TimeoutScale', 1))
201 except ValueError as e: 201 except ValueError as e:
202 logging.warning("Non-integer value of TimeoutScale ignored. (%s)", str(e)) 202 logging.warning("Non-integer value of TimeoutScale ignored. (%s)", str(e))
203 scale = 1 203 scale = 1
204 timeout *= scale 204 timeout *= scale
205 205
206 return timeout 206 return timeout
207 207
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698