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 9 # pylint: disable=R0201 10 11 def __init__(self): 12 """Does nothing.""" 13 pass 14 15 def GetTestWrapper(self): 16 """Returns a string that is to be prepended to the test command line.""" 17 return '' 18 19 def GetUtilWrapper(self): 20 """Returns the wrapper name for the utilities. 21 22 Returns: 23 A string that is to be prepended to the command line of utility 24 processes (forwarder, etc.). 25 """ 26 return '' 27 28 @classmethod 29 def CopyFiles(cls, device): 30 """Copies tool-specific files to the device, create directories, etc.""" 31 pass 32 33 def SetupEnvironment(self): 34 """Sets up the system environment for a test. 35 36 This is a good place to set system properties. 37 """ 38 pass 39 40 def CleanUpEnvironment(self): 41 """Cleans up environment.""" 42 pass 43 44 def GetTimeoutScale(self): 45 """Returns a multiplier that should be applied to timeout values.""" 46 return 1.0 47 48 def NeedsDebugInfo(self): 49 """Whether this tool requires debug info. 50 51 Returns: 52 True if this tool can not work with stripped binaries. 53 """ 54 return False 55