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

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

Issue 1415413005: Revert of [Android] Add a configurable environment for devil/. (RELAND) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 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
78 """Get the git hash and commit position of the chromium master branch. 77 """Get the git hash and commit position of the chromium master branch.
79 78
80 See: https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/s lave/runtest.py#212 79 See: https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/s lave/runtest.py#212
81 80
82 Returns: 81 Returns:
83 A dictionary with 'revision' and 'commit_pos' keys. 82 A dictionary with 'revision' and 'commit_pos' keys.
84 """ 83 """
85 # pylint: enable=line-too-long
86 status, output = cmd_helper.GetCmdStatusAndOutput( 84 status, output = cmd_helper.GetCmdStatusAndOutput(
87 ['git', 'log', '-n', '1', '--pretty=format:%H%n%B', 'HEAD'], 85 ['git', 'log', '-n', '1', '--pretty=format:%H%n%B', 'HEAD'],
88 constants.DIR_SOURCE_ROOT) 86 constants.DIR_SOURCE_ROOT)
89 revision = None 87 revision = None
90 commit_pos = None 88 commit_pos = None
91 if not status: 89 if not status:
92 lines = output.splitlines() 90 lines = output.splitlines()
93 revision = lines[0] 91 revision = lines[0]
94 for line in reversed(lines): 92 for line in reversed(lines):
95 m = _GIT_CR_POS_RE.match(line.strip()) 93 m = _GIT_CR_POS_RE.match(line.strip())
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 Returns: 454 Returns:
457 A tuple of (TestRunResults, retry). 455 A tuple of (TestRunResults, retry).
458 """ 456 """
459 _, result_type = self._LaunchPerfTest(test_name) 457 _, result_type = self._LaunchPerfTest(test_name)
460 results = base_test_result.TestRunResults() 458 results = base_test_result.TestRunResults()
461 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) 459 results.AddResult(base_test_result.BaseTestResult(test_name, result_type))
462 retry = None 460 retry = None
463 if not results.DidRunPass(): 461 if not results.DidRunPass():
464 retry = test_name 462 retry = test_name
465 return results, retry 463 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