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

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

Issue 1091683003: Update the activity name reference after rename. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | « no previous file | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Class for running instrumentation tests on a single device.""" 5 """Class for running instrumentation tests on a single device."""
6 6
7 import logging 7 import logging
8 import os 8 import os
9 import re 9 import re
10 import sys 10 import sys
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 221
222 # Wait and grab annotation data so we can figure out which traces to parse 222 # Wait and grab annotation data so we can figure out which traces to parse
223 regex = self._logcat_monitor.WaitFor( 223 regex = self._logcat_monitor.WaitFor(
224 re.compile(r'\*\*PERFANNOTATION\(' + raw_test_name + r'\)\:(.*)')) 224 re.compile(r'\*\*PERFANNOTATION\(' + raw_test_name + r'\)\:(.*)'))
225 225
226 # If the test is set to run on a specific device type only (IE: only 226 # If the test is set to run on a specific device type only (IE: only
227 # tablet or phone) and it is being run on the wrong device, the test 227 # tablet or phone) and it is being run on the wrong device, the test
228 # just quits and does not do anything. The java test harness will still 228 # just quits and does not do anything. The java test harness will still
229 # print the appropriate annotation for us, but will add --NORUN-- for 229 # print the appropriate annotation for us, but will add --NORUN-- for
230 # us so we know to ignore the results. 230 # us so we know to ignore the results.
231 # The --NORUN-- tag is managed by MainActivityTestBase.java 231 # The --NORUN-- tag is managed by ChromeTabbedActivityTestBase.java
232 if regex.group(1) != '--NORUN--': 232 if regex.group(1) != '--NORUN--':
233 233
234 # Obtain the relevant perf data. The data is dumped to a 234 # Obtain the relevant perf data. The data is dumped to a
235 # JSON formatted file. 235 # JSON formatted file.
236 json_string = self.device.ReadFile( 236 json_string = self.device.ReadFile(
237 '/data/data/com.google.android.apps.chrome/files/PerfTestData.txt', 237 '/data/data/com.google.android.apps.chrome/files/PerfTestData.txt',
238 as_root=True) 238 as_root=True)
239 239
240 if not json_string: 240 if not json_string:
241 raise Exception('Perf file is empty') 241 raise Exception('Perf file is empty')
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 except device_errors.CommandTimeoutError as e: 362 except device_errors.CommandTimeoutError as e:
363 results.AddResult(test_result.InstrumentationTestResult( 363 results.AddResult(test_result.InstrumentationTestResult(
364 test, base_test_result.ResultType.TIMEOUT, start_ms, duration_ms, 364 test, base_test_result.ResultType.TIMEOUT, start_ms, duration_ms,
365 log=str(e) or 'No information')) 365 log=str(e) or 'No information'))
366 except device_errors.DeviceUnreachableError as e: 366 except device_errors.DeviceUnreachableError as e:
367 results.AddResult(test_result.InstrumentationTestResult( 367 results.AddResult(test_result.InstrumentationTestResult(
368 test, base_test_result.ResultType.CRASH, start_ms, duration_ms, 368 test, base_test_result.ResultType.CRASH, start_ms, duration_ms,
369 log=str(e) or 'No information')) 369 log=str(e) or 'No information'))
370 self.TestTeardown(test, results) 370 self.TestTeardown(test, results)
371 return (results, None if results.DidRunPass() else test) 371 return (results, None if results.DidRunPass() else test)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698