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

Unified Diff: build/android/pylib/instrumentation/test_runner.py

Issue 732423002: Update from chromium https://crrev.com/304586 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « build/android/pylib/instrumentation/test_jar.py ('k') | build/android/pylib/uiautomator/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 60e00f33efca8b74a18ee9647f61004e56f1f99c..f2808da8560a15e230002fa2116b4a7a8eaaf965 100644
--- a/build/android/pylib/instrumentation/test_runner.py
+++ b/build/android/pylib/instrumentation/test_runner.py
@@ -208,8 +208,8 @@ class TestRunner(base_test_runner.BaseTestRunner):
Returns:
Whether the feature being tested is FirstRunExperience.
"""
- freFeature = 'Feature:FirstRunExperience'
- return freFeature in self.test_pkg.GetTestAnnotations(test)
+ annotations = self.test_pkg.GetTestAnnotations(test)
+ return ('FirstRunExperience' == annotations.get('Feature', None))
def _IsPerfTest(self, test):
"""Determines whether a test is a performance test.
@@ -329,10 +329,11 @@ class TestRunner(base_test_runner.BaseTestRunner):
annotations = self.test_pkg.GetTestAnnotations(test)
timeout_scale = 1
if 'TimeoutScale' in annotations:
- for annotation in annotations:
- scale_match = re.match('TimeoutScale:([0-9]+)', annotation)
- if scale_match:
- timeout_scale = int(scale_match.group(1))
+ try:
+ timeout_scale = int(annotations['TimeoutScale'])
+ except ValueError:
+ logging.warning('Non-integer value of TimeoutScale ignored. (%s)'
+ % annotations['TimeoutScale'])
if self.options.wait_for_debugger:
timeout_scale *= 100
return timeout_scale
« no previous file with comments | « build/android/pylib/instrumentation/test_jar.py ('k') | build/android/pylib/uiautomator/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698