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__), '..', '..')) 18 19 _AddToPathIfNeeded(os.path.join(catapult_path, 'dashboard')) 20 import dashboard 21 paths = dashboard.PathsForDeployment() 22 23 _AddToPathIfNeeded(catapult_path) 24 from catapult_build import appengine_dev_server 25 appengine_dev_server.DevAppserver(paths, sys.argv[1:]) 26 27 28 if __name__ == '__main__': 29 Main() 30