mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 06:31:18 +02:00
Run devserver with --factory_config. Add --start_devserver flag.
Change-Id: I9ed0a10033ce608c7ef35465debfc874b55d748c BUG=7474 TEST=run locally Review URL: http://codereview.chromium.org/4452001
This commit is contained in:
parent
41a2b700a2
commit
ca3029e0d2
@ -37,7 +37,7 @@ FLAGS = gflags.FLAGS
|
|||||||
gflags.DEFINE_string('board', None, 'Platform to build.')
|
gflags.DEFINE_string('board', None, 'Platform to build.')
|
||||||
gflags.DEFINE_string('base_image', None, 'Path to base image.')
|
gflags.DEFINE_string('base_image', None, 'Path to base image.')
|
||||||
gflags.DEFINE_string('firmware_updater', None, 'Path to firmware updater.')
|
gflags.DEFINE_string('firmware_updater', None, 'Path to firmware updater.')
|
||||||
|
gflags.DEFINE_boolean('start_devserver', False, 'Start devserver.')
|
||||||
|
|
||||||
class KillableProcess():
|
class KillableProcess():
|
||||||
"""A killable process.
|
"""A killable process.
|
||||||
@ -77,7 +77,7 @@ class KillableProcess():
|
|||||||
|
|
||||||
def start_devserver():
|
def start_devserver():
|
||||||
"""Starts devserver."""
|
"""Starts devserver."""
|
||||||
cmd = 'python devserver.py'
|
cmd = 'python devserver.py --factory_config miniomaha.conf'
|
||||||
print 'Running command: %s' % cmd
|
print 'Running command: %s' % cmd
|
||||||
devserver_process = KillableProcess(cmd, cwd=DEVSERVER_DIR)
|
devserver_process = KillableProcess(cmd, cwd=DEVSERVER_DIR)
|
||||||
devserver_process.start(wait=False)
|
devserver_process.start(wait=False)
|
||||||
@ -174,6 +174,7 @@ def main(argv):
|
|||||||
FLAGS.firmware_updater,
|
FLAGS.firmware_updater,
|
||||||
folder=FLAGS.board, board=FLAGS.board)
|
folder=FLAGS.board, board=FLAGS.board)
|
||||||
|
|
||||||
|
if FLAGS.start_devserver:
|
||||||
start_devserver()
|
start_devserver()
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user