• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2015 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5
6class BaseTool(object):
7  """A tool that does nothing."""
8  # pylint: disable=R0201
9
10  def __init__(self):
11    """Does nothing."""
12    pass
13
14  def GetTestWrapper(self):
15    """Returns a string that is to be prepended to the test command line."""
16    return ''
17
18  def GetUtilWrapper(self):
19    """Returns the wrapper name for the utilities.
20
21    Returns:
22       A string that is to be prepended to the command line of utility
23    processes (forwarder, etc.).
24    """
25    return ''
26
27  @classmethod
28  def CopyFiles(cls, device):
29    """Copies tool-specific files to the device, create directories, etc."""
30    pass
31
32  def SetupEnvironment(self):
33    """Sets up the system environment for a test.
34
35    This is a good place to set system properties.
36    """
37    pass
38
39  def CleanUpEnvironment(self):
40    """Cleans up environment."""
41    pass
42
43  def GetTimeoutScale(self):
44    """Returns a multiplier that should be applied to timeout values."""
45    return 1.0
46
47  def NeedsDebugInfo(self):
48    """Whether this tool requires debug info.
49
50    Returns:
51      True if this tool can not work with stripped binaries.
52    """
53    return False
54