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

Side by Side Diff: build/android/pylib/valgrind_tools.py

Issue 1314313004: [Android][telemetry] Update pylib imports for modules that moved into devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/utils/timeout_retry_unittest.py ('k') | build/android/screenshot.py » ('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 (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 """ 5 """
6 Classes in this file define additional actions that need to be taken to run a 6 Classes in this file define additional actions that need to be taken to run a
7 test under some kind of runtime error detection tool. 7 test under some kind of runtime error detection tool.
8 8
9 The interface is intended to be used as follows. 9 The interface is intended to be used as follows.
10 10
(...skipping 10 matching lines...) Expand all
21 Call tool.CleanUpEnvironment(). 21 Call tool.CleanUpEnvironment().
22 """ 22 """
23 # pylint: disable=R0201 23 # pylint: disable=R0201
24 24
25 import glob 25 import glob
26 import logging 26 import logging
27 import os.path 27 import os.path
28 import subprocess 28 import subprocess
29 import sys 29 import sys
30 30
31 from devil.android import device_errors
31 from pylib.constants import DIR_SOURCE_ROOT 32 from pylib.constants import DIR_SOURCE_ROOT
32 from pylib.device import device_errors
33 33
34 34
35 def SetChromeTimeoutScale(device, scale): 35 def SetChromeTimeoutScale(device, scale):
36 """Sets the timeout scale in /data/local/tmp/chrome_timeout_scale to scale.""" 36 """Sets the timeout scale in /data/local/tmp/chrome_timeout_scale to scale."""
37 path = '/data/local/tmp/chrome_timeout_scale' 37 path = '/data/local/tmp/chrome_timeout_scale'
38 if not scale or scale == 1.0: 38 if not scale or scale == 1.0:
39 # Delete if scale is None/0.0/1.0 since the default timeout scale is 1.0 39 # Delete if scale is None/0.0/1.0 since the default timeout scale is 1.0
40 device.RunShellCommand('rm %s' % path) 40 device.RunShellCommand('rm %s' % path)
41 else: 41 else:
42 device.WriteFile(path, '%f' % scale, as_root=True) 42 device.WriteFile(path, '%f' % scale, as_root=True)
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 return 291 return
292 292
293 clazz = TOOL_REGISTRY.get(tool_name) 293 clazz = TOOL_REGISTRY.get(tool_name)
294 if clazz: 294 if clazz:
295 clazz.CopyFiles(device) 295 clazz.CopyFiles(device)
296 else: 296 else:
297 print 'Unknown tool %s, available tools: %s' % ( 297 print 'Unknown tool %s, available tools: %s' % (
298 tool_name, ', '.join(sorted(TOOL_REGISTRY.keys()))) 298 tool_name, ', '.join(sorted(TOOL_REGISTRY.keys())))
299 sys.exit(1) 299 sys.exit(1)
300 300
OLDNEW
« no previous file with comments | « build/android/pylib/utils/timeout_retry_unittest.py ('k') | build/android/screenshot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698