diff options
Diffstat (limited to 'bitbake/bin/bitbake')
-rwxr-xr-x | bitbake/bin/bitbake | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake index 7f8449c7b3..d46c3dde3b 100755 --- a/bitbake/bin/bitbake +++ b/bitbake/bin/bitbake | |||
@@ -196,6 +196,9 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters): | |||
196 | parser.add_option("", "--status-only", help = "Check the status of the remote bitbake server.", | 196 | parser.add_option("", "--status-only", help = "Check the status of the remote bitbake server.", |
197 | action = "store_true", dest = "status_only", default = False) | 197 | action = "store_true", dest = "status_only", default = False) |
198 | 198 | ||
199 | parser.add_option("-w", "--write-log", help = "Writes the event log of the build to a bitbake event json file. Use '' (empty string) to assign the name automatically.", | ||
200 | action = "store", dest = "writeeventlog") | ||
201 | |||
199 | options, targets = parser.parse_args(sys.argv) | 202 | options, targets = parser.parse_args(sys.argv) |
200 | 203 | ||
201 | # some environmental variables set also configuration options | 204 | # some environmental variables set also configuration options |
@@ -206,6 +209,14 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters): | |||
206 | if "BBTOKEN" in os.environ: | 209 | if "BBTOKEN" in os.environ: |
207 | options.xmlrpctoken = os.environ["BBTOKEN"] | 210 | options.xmlrpctoken = os.environ["BBTOKEN"] |
208 | 211 | ||
212 | if "BBEVENTLOG" is os.environ: | ||
213 | options.writeeventlog = os.environ["BBEVENTLOG"] | ||
214 | |||
215 | # fill in proper log name if not supplied | ||
216 | if options.writeeventlog is not None and len(options.writeeventlog) == 0: | ||
217 | import datetime | ||
218 | options.writeeventlog = "bitbake_eventlog_%s.json" % datetime.datetime.now().strftime("%Y%m%d%H%M%S") | ||
219 | |||
209 | # if BBSERVER says to autodetect, let's do that | 220 | # if BBSERVER says to autodetect, let's do that |
210 | if options.remote_server: | 221 | if options.remote_server: |
211 | [host, port] = options.remote_server.split(":", 2) | 222 | [host, port] = options.remote_server.split(":", 2) |
@@ -266,7 +277,6 @@ def start_server(servermodule, configParams, configuration, features): | |||
266 | return server | 277 | return server |
267 | 278 | ||
268 | 279 | ||
269 | |||
270 | def main(): | 280 | def main(): |
271 | 281 | ||
272 | configParams = BitBakeConfigParameters() | 282 | configParams = BitBakeConfigParameters() |