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

Side by Side Diff: build/android/pylib/perf/test_runner.py

Issue 1316413003: [Android] Add a configurable environment for devil/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 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
« no previous file with comments | « build/android/pylib/forwarder.py ('k') | build/android/pylintrc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 """Runs perf tests. 5 """Runs perf tests.
6 6
7 Our buildbot infrastructure requires each slave to run steps serially. 7 Our buildbot infrastructure requires each slave to run steps serially.
8 This is sub-optimal for android, where these steps can run independently on 8 This is sub-optimal for android, where these steps can run independently on
9 multiple connected devices. 9 multiple connected devices.
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 from pylib import forwarder 67 from pylib import forwarder
68 from pylib.base import base_test_result 68 from pylib.base import base_test_result
69 from pylib.base import base_test_runner 69 from pylib.base import base_test_runner
70 70
71 71
72 # Regex for the master branch commit position. 72 # Regex for the master branch commit position.
73 _GIT_CR_POS_RE = re.compile(r'^Cr-Commit-Position: refs/heads/master@{#(\d+)}$') 73 _GIT_CR_POS_RE = re.compile(r'^Cr-Commit-Position: refs/heads/master@{#(\d+)}$')
74 74
75 75
76 def _GetChromiumRevision(): 76 def _GetChromiumRevision():
77 # pylint: disable=line-too-long
77 """Get the git hash and commit position of the chromium master branch. 78 """Get the git hash and commit position of the chromium master branch.
78 79
79 See: https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/s lave/runtest.py#212 80 See: https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/s lave/runtest.py#212
80 81
81 Returns: 82 Returns:
82 A dictionary with 'revision' and 'commit_pos' keys. 83 A dictionary with 'revision' and 'commit_pos' keys.
83 """ 84 """
85 # pylint: enable=line-too-long
84 status, output = cmd_helper.GetCmdStatusAndOutput( 86 status, output = cmd_helper.GetCmdStatusAndOutput(
85 ['git', 'log', '-n', '1', '--pretty=format:%H%n%B', 'HEAD'], 87 ['git', 'log', '-n', '1', '--pretty=format:%H%n%B', 'HEAD'],
86 constants.DIR_SOURCE_ROOT) 88 constants.DIR_SOURCE_ROOT)
87 revision = None 89 revision = None
88 commit_pos = None 90 commit_pos = None
89 if not status: 91 if not status:
90 lines = output.splitlines() 92 lines = output.splitlines()
91 revision = lines[0] 93 revision = lines[0]
92 for line in reversed(lines): 94 for line in reversed(lines):
93 m = _GIT_CR_POS_RE.match(line.strip()) 95 m = _GIT_CR_POS_RE.match(line.strip())
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 Returns: 441 Returns:
440 A tuple of (TestRunResults, retry). 442 A tuple of (TestRunResults, retry).
441 """ 443 """
442 _, result_type = self._LaunchPerfTest(test_name) 444 _, result_type = self._LaunchPerfTest(test_name)
443 results = base_test_result.TestRunResults() 445 results = base_test_result.TestRunResults()
444 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) 446 results.AddResult(base_test_result.BaseTestResult(test_name, result_type))
445 retry = None 447 retry = None
446 if not results.DidRunPass(): 448 if not results.DidRunPass():
447 retry = test_name 449 retry = test_name
448 return results, retry 450 return results, retry
OLDNEW
« no previous file with comments | « build/android/pylib/forwarder.py ('k') | build/android/pylintrc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698