Home | History | Annotate | Download | only in bin
      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 catapult_build/."""
      7 
      8 import os
      9 import sys
     10 
     11 _CATAPULT = os.path.abspath(
     12     os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir))
     13 
     14 
     15 if __name__ == '__main__':
     16   sys.path.append(_CATAPULT)
     17 
     18   from hooks import install
     19   if '--no-install-hooks' in sys.argv:
     20     sys.argv.remove('--no-install-hooks')
     21   else:
     22     install.InstallHooks()
     23 
     24   from catapult_build import run_with_typ
     25   sys.exit(run_with_typ.Run(
     26       os.path.join(_CATAPULT, 'catapult_build'),
     27       path=[_CATAPULT]))
     28