diff options
Diffstat (limited to 'catapult/common/py_vulcanize/bin/run_py_tests')
-rwxr-xr-x | catapult/common/py_vulcanize/bin/run_py_tests | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/catapult/common/py_vulcanize/bin/run_py_tests b/catapult/common/py_vulcanize/bin/run_py_tests new file mode 100755 index 00000000..904c2138 --- /dev/null +++ b/catapult/common/py_vulcanize/bin/run_py_tests @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# Copyright 2015 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import os +import sys + +_CATAPULT = os.path.abspath(os.path.join( + os.path.dirname(__file__), os.path.pardir, os.path.pardir, os.path.pardir)) + + +def _AddToPathIfNeeded(path): + if path not in sys.path: + sys.path.insert(0, path) + + +if __name__ == '__main__': + _AddToPathIfNeeded(_CATAPULT) + + from hooks import install + if '--no-install-hooks' in sys.argv: + sys.argv.remove('--no-install-hooks') + else: + install.InstallHooks() + + from catapult_build import run_with_typ + sys.exit(run_with_typ.Run( + os.path.join(_CATAPULT, 'common', 'py_vulcanize'))) |