1#!/usr/bin/env python 2# Copyright (c) 2015 The Chromium Authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6"""Runs all Python unit tests in dependency_manager/.""" 7 8import os 9import sys 10 11_CATAPULT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 12 13sys.path.append(os.path.join(_CATAPULT, 'third_party', 'mock')) 14 15 16def main(): 17 sys.path.append(_CATAPULT) 18 19 from hooks import install 20 if '--no-install-hooks' in sys.argv: 21 sys.argv.remove('--no-install-hooks') 22 else: 23 install.InstallHooks() 24 25 from catapult_build import run_with_typ 26 return run_with_typ.Run( 27 os.path.join(_CATAPULT, 'dependency_manager'), path=[_CATAPULT]) 28 29 30if __name__ == '__main__': 31 sys.exit(main()) 32