bitbake: knotty, bitbake: add option to terminate a remote server

I add an option to terminate a remote server gracefully
as not to need a kill command.

(Bitbake rev: 7495f835666a9561c2c7d84da7aaa74e4df55b9a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Alexandru DAMIAN 2013-06-17 12:11:52 +01:00 committed by Richard Purdie
parent 3ea9d647ec
commit f5cadbe005
2 changed files with 7 additions and 0 deletions

View File

@ -197,6 +197,9 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
parser.add_option("", "--remote-server", help = "Connect to the specified server",
action = "store", dest = "remote_server", default = False)
parser.add_option("-m", "--kill-server", help = "Terminate the remote server",
action = "store_true", dest = "kill_server", default = False)
parser.add_option("", "--observe-only", help = "Connect to a server as an observing-only client",
action = "store_true", dest = "observe_only", default = False)

View File

@ -250,6 +250,10 @@ def main(server, eventHandler, params, tf = TerminalFilter):
console.setFormatter(format)
logger.addHandler(console)
if params.options.remote_server and params.options.kill_server:
server.terminateServer()
return
if consolelogfile and not params.options.show_environment:
bb.utils.mkdirhier(os.path.dirname(consolelogfile))
conlogformat = bb.msg.BBLogFormatter(format_str)