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

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

Issue 26212003: android: Fix importing pexpect on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | no next file » | 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 a perf test on a single device. 5 """Runs a perf test on a single device.
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 27 matching lines...) Expand all
38 38
39 Note that script_to_execute necessarily have to take at least the following 39 Note that script_to_execute necessarily have to take at least the following
40 options: 40 options:
41 --device: the serial number to be passed to all adb commands. 41 --device: the serial number to be passed to all adb commands.
42 --keep_test_server_ports: indicates it's being run as a shard, and shouldn't 42 --keep_test_server_ports: indicates it's being run as a shard, and shouldn't
43 reset test server port allocation. 43 reset test server port allocation.
44 """ 44 """
45 45
46 import datetime 46 import datetime
47 import logging 47 import logging
48 import pexpect
49 import pickle 48 import pickle
50 import os 49 import os
51 import sys 50 import sys
52 51
53 from pylib import constants 52 from pylib import constants
53 from pylib import pexpect
54 from pylib.base import base_test_result 54 from pylib.base import base_test_result
55 from pylib.base import base_test_runner 55 from pylib.base import base_test_runner
56 56
57 57
58 def PrintTestOutput(test_name): 58 def PrintTestOutput(test_name):
59 """Helper method to print the output of previously executed test_name. 59 """Helper method to print the output of previously executed test_name.
60 60
61 Args: 61 Args:
62 test_name: name of the test that has been previously executed. 62 test_name: name of the test that has been previously executed.
63 63
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 Returns: 164 Returns:
165 A tuple of (TestRunResults, retry). 165 A tuple of (TestRunResults, retry).
166 """ 166 """
167 output, result_type = self._LaunchPerfTest(test_name) 167 output, result_type = self._LaunchPerfTest(test_name)
168 results = base_test_result.TestRunResults() 168 results = base_test_result.TestRunResults()
169 results.AddResult(base_test_result.BaseTestResult(test_name, result_type)) 169 results.AddResult(base_test_result.BaseTestResult(test_name, result_type))
170 retry = None 170 retry = None
171 if not results.DidRunPass(): 171 if not results.DidRunPass():
172 retry = test_name 172 retry = test_name
173 return results, retry 173 return results, retry
OLDNEW
« no previous file with comments | « build/android/pylib/android_commands.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698