• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
6import argparse
7import os
8import sys
9
10
11def _AddToPathIfNeeded(path):
12  if path not in sys.path:
13    sys.path.insert(0, path)
14
15
16def Main():
17  catapult_path = os.path.abspath(os.path.join(
18      os.path.dirname(__file__), '..', '..'))
19  parser = argparse.ArgumentParser()
20  parser.add_argument('--appid', default='chromeperf')
21  args = parser.parse_args()
22
23  _AddToPathIfNeeded(os.path.join(catapult_path, 'dashboard'))
24  import dashboard
25  paths = dashboard.PathsForDeployment()
26
27  _AddToPathIfNeeded(catapult_path)
28  from catapult_build import appengine_deploy
29  appengine_deploy.AppcfgUpdate(paths, app_id=args.appid)
30
31
32if __name__ == '__main__':
33  Main()
34