Home | History | Annotate | Download | only in bin
      1 #!/usr/bin/python
      2 # Copyright 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 import os
      7 import sys
      8 
      9 
     10 def _AddToPathIfNeeded(path):
     11   if path not in sys.path:
     12     sys.path.insert(0, path)
     13 
     14 
     15 def Main():
     16   catapult_path = os.path.abspath(os.path.join(
     17       os.path.dirname(__file__), os.path.pardir, os.path.pardir))
     18 
     19   _AddToPathIfNeeded(
     20       os.path.join(catapult_path, 'perf_insights'))
     21   from perf_insights.endpoints import cloud_mapper
     22   paths = cloud_mapper.PathsForDeployment()
     23 
     24   _AddToPathIfNeeded(catapult_path)
     25   from catapult_build import appengine_dev_server
     26 
     27   appengine_dev_server.DevAppserver(
     28       paths, ['local_worker.yaml', 'dispatch.yaml'] + sys.argv[1:])
     29 
     30 if __name__ == '__main__':
     31   Main()
     32