1# Copyright 2014 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 5import os 6import sys 7 8 9ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) 10 11 12def RegisterAllBackends(): 13 """Registers all the known backends.""" 14 from memory_inspector.core import backends 15 from memory_inspector.backends.android import android_backend 16 backends.Register(android_backend.AndroidBackend()) 17 18 19def _IncludeDeps(): 20 """Imports all the project dependencies.""" 21 chromium_dir = os.path.abspath(os.path.join(ROOT_DIR, os.pardir, os.pardir)) 22 assert(os.path.isdir(chromium_dir)), 'Cannot find chromium ' + chromium_dir 23 24 sys.path += [ 25 ROOT_DIR, 26 27 # Include all dependencies. 28 os.path.join(chromium_dir, 'build', 'android'), # For pylib. 29 ] 30 31_IncludeDeps()