cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / chrome / common / extensions / docs / server2 / start_dev_server.py
blob687413d4dcab3a501b3617db717092dfe386eb9c
1 #!/usr/bin/env python
2 # Copyright (c) 2012 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.
6 import os
7 import signal
8 import shutil
9 import subprocess
10 import sys
12 import build_server
14 SERVER_PATH = sys.path[0]
15 SRC_PATH = os.path.join(SERVER_PATH, os.pardir, os.pardir, os.pardir, os.pardir,
16 os.pardir)
17 FILENAMES = ['app.yaml', 'appengine_main.py']
19 def CleanUp(signal, frame):
20 for filename in FILENAMES:
21 os.remove(os.path.join(SRC_PATH, filename))
23 if len(sys.argv) < 2:
24 print 'usage: start_dev_server.py <location of dev_appserver.py> [options]'
25 exit(0)
27 signal.signal(signal.SIGINT, CleanUp)
29 build_server.main()
30 for filename in FILENAMES:
31 shutil.copy(os.path.join(SERVER_PATH, filename),
32 os.path.join(SRC_PATH, filename))
33 args = [sys.executable] + sys.argv[1:] + [SRC_PATH]
34 subprocess.call(args)