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 6import argparse 7import os 8import sys 9 10hooks_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) 11if hooks_path not in sys.path: 12 sys.path.append(hooks_path) 13 14from hooks import install 15 16import tracing # Brings in tvcm bindings. 17from tvcm import test_runner 18import tvcm 19import vinn 20 21 22if __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