1 #!/usr/bin/env python 2 # Copyright (c) 2014 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 import argparse 7 import os 8 import sys 9 10 hooks_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) 11 if hooks_path not in sys.path: 12 sys.path.append(hooks_path) 13 14 from hooks import install 15 16 import tracing # Brings in tvcm bindings. 17 from tvcm import test_runner 18 import tvcm 19 import vinn 20 21 22 if __name__ == '__main__': 23 parser = argparse.ArgumentParser( 24 description='Run python tests.') 25 parser.add_argument( 26 '--no-install-hooks', dest='install_hooks', action='store_false') 27 parser.set_defaults(install_hooks=True) 28 args = parser.parse_args() 29 if args.install_hooks: 30 install.InstallHooks() 31 32 runner = test_runner.TestRunner() 33 runner.AddModule(tvcm) 34 runner.AddModule(vinn) 35 runner.AddModule(tracing) 36 sys.exit(runner.Main()) 37