예제 #1
0
def _ReadSnapItSource(path):
    """ Returns the contents of the snap-it source file at the given path
  relative to the snap-it repository.
  """
    full_path = os.path.join(util.GetCatapultThirdPartyDir(), 'snap-it', path)
    with open(full_path) as f:
        return f.read()
예제 #2
0
                             '..')
_AddDirToPythonPath(_CATAPULT_DIR, 'common', 'py_utils')
_AddDirToPythonPath(_CATAPULT_DIR, 'dependency_manager')
_AddDirToPythonPath(_CATAPULT_DIR, 'devil')
_AddDirToPythonPath(_CATAPULT_DIR, 'systrace')
_AddDirToPythonPath(_CATAPULT_DIR, 'tracing')
_AddDirToPythonPath(_CATAPULT_DIR, 'common', 'py_trace_event')
_AddDirToPythonPath(_CATAPULT_DIR, 'common', 'battor')
_AddDirToPythonPath(_CATAPULT_DIR, 'common', 'py_vulcanize')
_AddDirToPythonPath(_CATAPULT_DIR, 'tracing', 'tracing_build')

from telemetry.core import util
from telemetry.internal.util import global_hooks

# Add Catapult third party dependencies into our path.
_AddDirToPythonPath(util.GetCatapultThirdPartyDir(), 'typ')
# Required by websocket-client.
_AddDirToPythonPath(util.GetCatapultThirdPartyDir(), 'six')

# Add Telemetry third party dependencies into our path.
_TELEMETRY_3P = util.GetTelemetryThirdPartyDir()
_AddDirToPythonPath(util.GetTelemetryThirdPartyDir(), 'altgraph')
_AddDirToPythonPath(util.GetTelemetryThirdPartyDir(), 'mock')
_AddDirToPythonPath(util.GetTelemetryThirdPartyDir(), 'modulegraph')
_AddDirToPythonPath(util.GetTelemetryThirdPartyDir(), 'mox3')
_AddDirToPythonPath(util.GetTelemetryThirdPartyDir(), 'png')
_AddDirToPythonPath(util.GetTelemetryThirdPartyDir(), 'pyfakefs')
_AddDirToPythonPath(util.GetTelemetryThirdPartyDir(), 'web-page-replay')
_AddDirToPythonPath(util.GetTelemetryThirdPartyDir(), 'websocket-client')
_AddOptionalSingleGlobToPythonPath(_TELEMETRY_3P, 'cv2', 'lib', 'cv2_*')
_AddOptionalSingleGlobToPythonPath(_TELEMETRY_3P, 'numpy', 'lib', 'numpy_*')