summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui/toasterui.py
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: toaster: Added new feature to import eventlogs from command line ↵Marlon Rodriguez Garcia2023-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | into toaster using replay functionality Added a new button on the base template to access a new template. Added a model register the information on the builds and generate access links Added a form to include the option to load specific files Added jquery and ajax functions to block screen and redirect to build page when import eventlogs is trigger Added a new button on landing page linked to import build page, and set min-height of buttons in landing page for uniformity Removed test assertion to check command line build in content, because new button contains text Updated toaster_eventreplay to use library Fix test in test_layerdetails_page Rebased from master This feature uses the value from the variable BB_DEFAULT_EVENTLOG to read the files created by bitbake Exclude listing of files that don't contain the allvariables definitions used to replay builds This part of the feature should be revisited. Over a long period of time, the BB_DEFAULT_EVENTLOG will exponentially increase the size of the log file and cause bottlenecks when importing. (Bitbake rev: ab96cafe03d8bab33c1de09602cc62bd6974f157) Signed-off-by: Marlon Rodriguez Garcia <marlon.rodriguez-garcia@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ui/toasterui: Fix startup faults from incorrect event sequencingRichard Purdie2020-10-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | Toaster has been failing to start correctly when in interactive mode. The issue is due to setEventMask being called (which triggers parsing) before the environment has been sent from the UI over to the server. This means PATH isn't setup, which causes the sanity checks on HOSTTOOLS to fail in base.bbclass. The fix is to ensure the environment is sent to the server before other commands are run. The pain in debugging this highlights other improvements to the logging are needed. [YOCTO #14079] Reviewed-by: Tim Orling <timothy.t.orling@linux.intel.com> Tested-by: Tim Orling <timothy.t.orling@linux.intel.com> (Bitbake rev: a8efff5c83cd5a25f4b6720e6414a7aa35d04bc7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib: amend code to use proper singleton comparisons where possibleFrazer Clews2020-01-191-1/+1
| | | | | | | | | | | amend the code to handle singleton comparisons properly so it only checks if they only refer to the same object or not, and not bother comparing the values. (Bitbake rev: b809a6812aa15a8a9af97bc382cc4b19571e6bfc) Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Drop duplicate license boilerplace textRichard Purdie2019-05-041-12/+0
| | | | | | | | | | With the introduction of SPDX-License-Identifier headers, we don't need a ton of header boilerplate in every file. Simplify the files and rely on the top level for the full licence text. (Bitbake rev: 695d84397b68cc003186e22f395caa378b06bc75) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Add initial pass of SPDX license headers to source codeRichard Purdie2019-05-041-0/+2
| | | | | | | | | | | | | | | | | This adds the SPDX-License-Identifier license headers to the majority of our source files to make it clearer exactly which license files are under. The bulk of the files are under GPL v2.0 with one found to be under V2.0 or later, some under MIT and some have dual license. There are some files which are potentially harder to classify where we've imported upstream code and those can be handled specifically in later commits. The COPYING file is replaced with LICENSE.X files which contain the full license texts. (Bitbake rev: ff237c33337f4da2ca06c3a2c49699bc26608a6b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/event: refactor printing eventsPaul Eggleton2017-07-211-21/+4
| | | | | | | | | | | | We really ought to have just one place where the string representation of these events is produced. This doesn't take any real control away from the UI - if an alternative representation is desired, that can still be made. (Bitbake rev: cb15db2a799be6d8eab9a2a43a9a573f89229cff) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix SDK artifact captureDavid Reyna2017-04-111-3/+1
| | | | | | | | | | | | | | | | | Use the TaskArtifacts event to scan the SDK and ESDK manifests to cleanly collect the respective artifact files. The previous method was broken when the SDK file deployment moved from the do_populate_sdk[_ext] tasks to their sstate tasks. That method is disabled (but not yet removed) in preparation for the rest of refactor work for the parent #10283 work. [YOCTO #10850] (Bitbake rev: 1360d7b847cc01031edb2f4b289fac9560d72fa7) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker process: fire heartbeat event at regular time intervalsPatrick Ohly2016-12-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | The intended usage is for recording current system statistics from /proc in buildstats.bbclass during a build and for improving the BB_DISKMON_DIRS implementation. All other existing hooks are less suitable because they trigger at unpredictable rates: too often can be handled by doing rate-limiting in the event handler, but not often enough (for example, when there is only one long-running task) cannot because the handler does not get called at all. The implementation of the new heartbeat event hooks into the cooker process event queue. The process already wakes up every 0.1s, which is often enough for the intentionally coarse 1s delay between heartbeats. That value was chosen to keep the overhead low while still being frequent enough for the intended usage. If necessary, BB_HEARTBEAT_EVENT can be set to a float specifying the delay in seconds between these heartbeat events. (Bitbake rev: 7cf22ea057d28c54bd98dc1ab7a43402a29ff1f5) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui.py: warn if buildstats is missingOlaf Mandel2016-11-041-0/+3
| | | | | | | | | | Like for buildhistory, warn if buildstats is missing from INHERIT. CC: Joshua Lock <joshua.g.lock@linux.intel.com> (Bitbake rev: 3570a8cf94354c8ab07513c304ebae33623fea33) Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: make error message more informativeEd Bartosh2016-09-301-1/+1
| | | | | | | | | | | | | | | | | Error message ERROR: Unprocessed MetadataEvent <bb.event.MetadataEvent object at 0x7f750e671a58> doesn't give a lot of information about the event. It just prints event object, which is always bb.event.MetadataEvent. Including event type into the error message should make it more informative: ERROR: Unprocessed MetadataEvent TaskArtifacts (Bitbake rev: 603c7c13536d3fa1786270e863688c1d2e511196) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix 'Unhandled MetadataEvent' errorEd Bartosh2016-09-301-0/+4
| | | | | | | | | | | | New MetadataEvent 'TaskArtifacts' causes this error. Processing of this event will hopefully be implemented in future. For now it should be enough to just skip it. (Bitbake rev: 114a3fe3f23ef09782c5aa18f425d0d0dbdfdd35) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix handling of EnvironmentErrorEd Bartosh2016-09-301-3/+6
| | | | | | | | | | | | | Due to the bug in processing EnvironmentError exception, toasterui ignores it. As EnvironmentError is a base for OSError and IOError this means that all OSError and IOError exceptions were silently ignored. (Bitbake rev: c8f4ca008bf9396b0ed45d44bfe2220c82a614a9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui, knotty: don't print taskid followed by taskstring which ↵Martin Jansa2016-08-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | are now in most cases identical * unify the format how the task is described * don't show taskid followed by taskstring as the taskstring is different only for setscene tasks (by _setscene suffix) * the duplicated output was introduced by: 2c88afb taskdata/runqueue: Rewrite without use of ID indirection as reported and confirmed as a bug here: http://lists.openembedded.org/pipermail/openembedded-core/2016-June/123148.html * show: NOTE: Running task 541 of 548 (/OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_package) instead of much longer: NOTE: Running task 541 of 548 (ID: /OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_package, /OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_package) and similarly for failed tasks: ERROR: Task (virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_install) failed with exit code '1' instead of much longer: ERROR: Task virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_install (virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_install) failed with exit code '1' (Bitbake rev: 696693d45f5eff1226866ed79dbfb67161d8cd3f) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: ensure that the Build object is always availableElliot Smith2016-08-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Many of the methods in toasterui and buildinfohelper rely on the internal state of the buildinfohelper; in particular, they need a Build object to have been created on the buildinfohelper. If the creation of this Build object is tied to an event which may or may not occur, there's no guarantee that it will exist. This then causes assertion errors in those methods. To prevent this from happening, add an _ensure_build() method to buildinfohelper. This ensures that a minimal Build object is always available whenever it is needed, either by retrieving it from the BuildRequest or creating it; it also ensures that the Build object is up to date with whatever data is available on the bitbake server (DISTRO, MACHINE etc.). This method is then called by any other method which relies on a Build object being in the internal state, ensuring that the object is either available, or creating it. (Bitbake rev: 0990b4c73f194ec0be1762e4e48b1a525d8349fb) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: show progress of recipe parsing in recent builds areaElliot Smith2016-08-111-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Modify buildinfohelper and toasterui so that they record the recipe parse progress (from ParseProgress events in bitbake) on the Build object. Note that because the Build object is now created at the point when ParseStarted occurs, it is necessary to set the build name to the empty string initially (hence the migration). The build name can be set when the build properly starts, i.e. at the BuildStarted event. Then use this additional data to determine whether a Build is in a "Parsing" state, and report this in the JSON API. This enables the most recent builds area to show the recipe parse progress. Add additional logic to update the progress bar if the progress for a build object changes. [YOCTO #9631] (Bitbake rev: f33d51d46d70e73e04e325807c1bc4eb68462f7b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: improve scan for SDK artifactsElliot Smith2016-07-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SDK artifacts were previously picked up by toaster.bbclass and notified to buildinfohelper (via toasterui). The artifacts were then added to the Build object, so that it wasn't clear which artifact went with which target; we were also unable to attach SDK artifacts to a Build if they had already been attached to a previous build. Now, toaster.bbclass just notifies the TOOLCHAIN_OUTPUTNAME when a populate_sdk* target completes. The scan is moved to buildinfohelper, where we search the SDK deploy directory for files matching TOOLCHAIN_OUTPUTNAME and attach them to targets (not builds). If an SDK file is not produced by a target, we now look for a similar, previously-run target which did produce artifacts. If there is one, we clone the SDK artifacts from that target onto the current one. This all means that we can show SDK artifacts by target, and should always get artifacts associated with a target, regardless of whether it really build them. This requires an additional model, TargetSDKFile, which tracks the size and path of SDK artifact files with respect to Target objects. [YOCTO #8556] (Bitbake rev: 5e650c611605507e1e0d1588cd5eb6535c2d34fc) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: do image and artifact scan on BuildCompletedElliot Smith2016-07-191-4/+2
| | | | | | | | | | | | | | | | Move the image and artifact scan code from toaster.bbclass and consolidate its logic with the existing logic in buildinfohelper. Remove handler setup for events which used to be fired from toaster.bbclass but which are now handled directly by buildinfohelper. [YOCTO #8556] (Bitbake rev: f0085cd554604cfff4a3f40a34825fbb6878004f) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: capture keyboard interrupts the same way as knottyElliot Smith2016-05-171-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | knotty captures two levels of keyboard interrupt: a single interrupt or two interrupts in a row. These then trigger stateShutdown and stateForceShutdown respectively. toasterui doesn't have an equivalent way of capturing interrupts and using them to shut down bitbake. Now that we are no longer using knotty + XMLRPCServer for our command line builds (since switching to per-project build directories), we see some odd side effects of this, such as builds continuing after they have been interrupted on the command line. Bring toasterui in line with knotty (copy-paste most of the code in knotty.py which deals with interrupts) so that a keyboard interrupt actually shuts down the bitbake server (if not in observe only mode). Additionally use the cancel_cli_build() method to set the Build status to CANCELLED in Toaster's db when we get keyboard interrupts. This means that builds interrupted on the command line show as cancelled (same as if they'd been cancelled from the Toaster UI), as specified in the UI designs. [YOCTO #8515] (Bitbake rev: d39d2edca95900da433074ee95a192d7bfe7090d) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/toasterui: Drop SEND_DEPENDS_TREE UI featureRichard Purdie2016-05-141-1/+1
| | | | | | | | | Now the event is sent unconditionally we can drop this feature as its no longer needed. (Bitbake rev: 473deeb0fc6065693e1fcfcbb8b79753103db537) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Update logger.warn() -> logger.warning()Richard Purdie2016-05-111-3/+3
| | | | | | | | | | python deprecated logger.warn() in favour of logger.warning(). This is only used in bitbake code so we may as well just translate everything to avoid warnings under python 3. Its safe for python 2.7. (Bitbake rev: 676a5f592e8507e81b8f748d58acfea7572f8796) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: shutdown on BuildCompleted eventEd Bartosh2016-04-061-5/+8
| | | | | | | | | | | | | | | | | | | | | toasterui exits event loop on one of the following events: CommandCompleted, CommandFailed or CommandExit. Unfortunately none of them come from bitbake when build fails. This is normai if toasterui runs in observer mode. However, if it's in build mode this causes toasterui to stuck in the infinite loop waiting for new events. The only event we can rely on is BuildCompleted as it always comes from bitbake unlike 3 above mentioned events. Modified the code to always shutdown toasterui in build mode on BuildCompleted event. (Bitbake rev: 9cd60f98b13cf7b1c518851a51e1cbaa596d8f81) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: fix brbe reportingEd Bartosh2016-04-061-3/+3
| | | | | | | | | | | | | | | | | buildinfohelper.brbe is lost when buildinfohelper is closed. This causes incorrect report of brbe when build is done. Saved brbe attribute before closing buildinfohelper and used it to report correct brbe. Got rid of useless and confusing 'ToasterUI build done 1' log message. (Bitbake rev: 5d7cce0d0ed70f6b3ebd6cbad300d86964a13398) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: add brbe parameter to buildinfohelperEd Bartosh2016-04-061-1/+2
| | | | | | | | | | | | | | | | | | | In current toaster code BRBE(build request:build environment) value is passed from toaster to buildinfohelper through the 'SetBRBE' event. Passing it through environment variable is easier as it doesn't involve rpc communication between toaster and bitbake server. It also eliminates the need in running bitbake observer process. Added parameter 'brbe' to BuildInfoHelper.__init__ Used environment variable TOASTER_BRBE to set brbe for buildinfohelper object. (Bitbake rev: a0c8e2b309055e5927a8ff729d292ccaa69d0575) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: remove ParseStarted from the event listEd Bartosh2016-03-231-1/+0
| | | | | | | | | | | | | | bb.event.ParseStarted event is not processed by toasterui, but present in event list. This causes the following error: WARNING: Unknown event: <bb.event.ParseStarted object at ... and non-zero return code: WARNING: Return value is 1 (Bitbake rev: 1cc102f3d83d9467a3a3c422254333796ba95605) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: Remove the excessive exception loggingMichael Wood2016-03-231-7/+0
| | | | | | | | | | | | Remove the very verbose log dump from toasterui. This generates several megabytes of not that useful debug information and actually hinders finding the original exception. (Bitbake rev: a21dc134bdce2c9eb5e47c770094660f0c45c398) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: fix warning 'Unknown event'Ed Bartosh2016-03-071-0/+1
| | | | | | | | | | | Continue after processing BuildStarted event to fix WARNING: Unknown event: <bb.event.BuildStarted object at 0x2554150> (Bitbake rev: 12f1fb8c9b70fea0c9145f881bcceb8af32df6af) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: exit on final eventsEd Bartosh2016-03-071-1/+4
| | | | | | | | | | | | | | | Toasterui exits only if bitbake observer shuts down. In build mode it should exit when build is done. Made toasterui exit on bb.command.CommandCompleted, bb.command.CommandFailed and bb.command.CommandExit events when it's running in build mode. (Bitbake rev: b11f9d6d3c2eb615335901e1dcea699daf3afb4c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: make toasterui to work in build modeEd Bartosh2016-03-071-2/+17
| | | | | | | | | | | | | | | Currently toasterui works only in observer mode. This is artificial limitation which was made to support current toaster design. As we decided to stop using bitbake server we'll need to run toasterui also in build mode. [YOCTO #7880] (Bitbake rev: d4b5796899c3ca5c7becd7322291afd8afb35a31) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: check if setEventMask succeededEd Bartosh2016-03-071-2/+4
| | | | | | | | | | | | | | | Currently toasterui ignores return value of setEventMask command, which created confusing difference between set of events set by this command and the real set used in the code. Checked if setEventMask succeeded. Print error message and exit if it's not. (Bitbake rev: 6e3f13ffb47102b5df2da91fbc3f5da3179245b2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: update list of eventsEd Bartosh2016-03-071-15/+12
| | | | | | | | | | | Removed events not used in the code from the list. Added events that are used in the code. (Bitbake rev: 16b14ec16049cc2040a60ad5fc95f6e19dda91a6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: reformat list of eventsEd Bartosh2016-03-071-9/+27
| | | | | | | | | | | Reformatted and reordered list of events to make changes easily and see them clearly in the diffs. (Bitbake rev: 42a2d1115f2b23dc063a3172285ca3be73cf70bb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: log OSErrorException metadata eventsElliot Smith2016-01-181-0/+2
| | | | | | | | | | | | | | | | OSErrors occurring in toaster.bbclass are converted to OSErrorException metadata events. They were then being swallowed as unprocessed events by toasterui, which made them difficult to spot. Explicitly catch OSErrorException events and log them so they are easier to spot and debug. (Bitbake rev: 69f2b2bc373ce114609600b59a6b6ccef20771c9) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: listen for bb.event.MetadataEventElliot Smith2016-01-181-1/+2
| | | | | | | | | | | | | | | | | | The event mask for toasterui doesn't include MetadataEvents. This means that we're missing the ArtifactFileSize event (among others), which is the one we use to populate the SDK artifact table. Add that event type to the toasterui event mask so we can record SDK artifacts as they are created. [YOCTO #7603] (Bitbake rev: d0276a831bb8cffd42c8367895633eaa1fa1ed30) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: process SetBRBE eventEd Bartosh2015-12-141-0/+2
| | | | | | | | | | | | | | | | | Currently BRBE is known to toasterui only when build is started. It's passed to it with BuildStarted event. This is too late as if build fails earilier than build starts toasterui can not inform Toaster about the failure. Set BRBE as soon as it's provided by Toaster. This should make toasterui to be able to inform Toaster about early build failures, e.g. failures during recipe parsing. (Bitbake rev: d7819508dac488a64be3caec88db285cda9599ab) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: toasterui Add ParseStarted/ParseProgress events to maskbrian avery2015-12-091-2/+12
| | | | | | | | | | | | | | | | Toaster is not able to see ParseStarted and ParseProgress events for command-line builds. This means it's not possible for Toaster to detect failed builds, if the failure occurs at a point before the BuildStarted event, as the build won't show up at all. Add these events to the event mask, so that Toaster's toasterui can detect and respond to them. (Bitbake rev: 16bfd3e3d145705a2b3a05648ddbcacc7a338dfa) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: do not terminate bb serverEd Bartosh2015-12-071-9/+5
| | | | | | | | | | | | | | | Toaster needs bb server to be running all the time due to merged analysis and managed modes. Server gets restarted before every build triggered by UI, but it shouldn't be terminated as it will influence command line builds. [YOCTO #8279] (Bitbake rev: e69c87c7842e796ffcd7193ecde22c8f688498f5) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: Create per-build logsElliot Smith2015-10-291-26/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than relying on bug 8411, which is conveniently creating separate log files for each of our builds, create our own log file for each build. The log files are created in the same tmp directories that bitbake users, but are timestamped to the millisecond to avoid name collisions. Each log file is opened on a ParseStarted event (for builds triggered by Toaster) or BuildStarted event (for builds on the command line: Toaster doesn't get the ParseStarted event for command-line builds). The log file is closed on the BuildCompleted event, or if the build fails. Because we start logging on ParseStarted for Toaster builds, we're able to capture the "Build Configuration" section which bitbake writes to output. [YOCTO #8373] (Bitbake rev: 7974203cd8bc66dff1fcc55f8723dedefaf72840) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/ui: Use getSetVariable command for BB_CONSOLELOGRichard Purdie2015-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | Metadata can define BB_CONSOLELOG as containing ${DATETIME} and this can get expanded to a different value each time the variable is read. In the case of BB_CONSOLELOG, this behaviour is not desireable. The values of DATE/TIME are locked down at build time but this is too late for the purposes of ensuring the system can figure out the real value of BB_CONSOLELOG. The best way to do this is to set the variable into the datastore, thereby preserving its value. [YOCTO #8411] (Bitbake rev: 021f2eb55ab5863b57ed1b3f19f1b329bc1ad477) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Record critical errorsElliot Smith2015-10-161-0/+2
| | | | | | | | | | | | | | | | | | | | Critical errors (where a build failed for reasons of misconfiguration, such as a machine being specified which is not in a project's layers) were being ignored (only log records up to ERROR level were being logged to Toaster's db). This meant that the build would fail but would not correctly report why. Add support for CRITICAL error levels to the LogMessage model, include errors at this level in the errors property for a build, and show errors at this level in the build dashboard. [YOCTO #8320] (Bitbake rev: b6eacbca9cacb607de864ab7d093deb296da8226) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: use meaningful logging levelsEd Bartosh2015-10-111-4/+4
| | | | | | | | | | Changed logging levels to more appropriate ones. (Bitbake rev: 27d0360d13af0c698bf3a224b3f0d415f17bb678) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: ignore ReachableStamps eventEd Bartosh2015-10-111-1/+2
| | | | | | | | | | | | Added ReachableStamps event to the list of known events to ignore. This should stop toaster throwing error message: ERROR: Unknown event: <bb.event.ReachableStamps> (Bitbake rev: cd4137e13af6964858640b78aa7fe6f1612be251) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Read correct cooker log path from toasteruiElliot Smith2015-09-181-1/+1
| | | | | | | | | | | | | | | | | | | The BB_CONSOLELOG variable changes by the time we read it in BuildInfoHelper. This means that the log file location we are using is incorrect, so the links to the cooker logs don't work. Instead, read it at the point when the BuildStarted event occurs in toasterui. The BB_CONSOLELOG variable has the correct value here, so pass that to BuildInfoHelper. [YOCTO #8209] (Bitbake rev: 20609eebee0d2318806cf81913e7ce6dc1005507) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster logger: fix pylint issuesAlexandru DAMIAN2015-08-191-30/+27
| | | | | | | | | | | | | | | | | | | | This patch fixes pylint issues in the toaster build data logger, toasterui. The following types of warnings are touched here: * fixing imports * unused variables are set to _ * logger calls now use lazy evaluation instead of formatting the string * correct whitespace identation * removes unneeded "pass" statements, and extra parantheses * disable specific pylint warnings when decideing to override them (Bitbake rev: 947d47f15048baa967f88e03d80014e88ce152aa) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix pylint errorsAlexandru Damian2015-08-191-2/+3
| | | | | | | | | | | | | | | | | | | | Prompted by issues discovered during running pylint on the toaster sources, this patch fixes: * missing import in toaster ui * improper call of function in toaster ui (logger.debug) * improper function definitions in bbcontroller * invalid references to objects in bldcontrol.models * proper initialization of object fields in ToasterTables Also inhibiting specific pylint errors in files where the problems are mis-identified. (Bitbake rev: 1c71955c416fb68455f7f70669aba4202c411807) Signed-off-by: Alexandru Damian <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: toaster: Wait for toaster gui to comeEd Bartosh2015-08-011-0/+1
| | | | | | | | | | | | | | | Set logging level for the Toaster logger to get messages to toaster_ui.log Reverted previous workaround. [YOCTO: #7965] (Bitbake rev: f1d8e0ff7233f17cff3a56db10d2443b392b407d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix build execution regressionMichael Wood2015-07-021-0/+1
| | | | | | | | | | | | Make sure the error value is initialised and update the string match that we have to identify bitbake's current startup status. Patch contribution from Eduard Bartosh (Bitbake rev: 915ba08a8a3013e9787e564f2ffd8698c948f433) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: refactor build modelAlexandru DAMIAN2015-06-261-0/+3
| | | | | | | | | | | | | | | | We remove the "timespent", "errors_no" and "warnings_no" fields in favor of computing the needed values at runtime. This prevents inconsistencies in the UI. Also removeing all references to BuildRequests from the interface - all build details now display in the build dashboard. Minor fixes related to data logging. (Bitbake rev: 44f37394ed3e4ca02f940be172fe4395b0ee0f7d) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fixes after replacing BuildRequest with BuildAlexandru DAMIAN2015-06-261-14/+10
| | | | | | | | | | | This is a set of fixes that repair the interface after we switched from displaying BuildRequest data to Build data in the formerly "managed" mode. (Bitbake rev: 57f790b0c56297af8c83d5def8461bd5d61fe4af) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: close build on BuildCompleted eventAlexandru DAMIAN2015-05-081-16/+18
| | | | | | | | | | | Moving the code to close the build and instantiate a fresh buildinfohelper object to BuildCompleted event, as the CommandCompleted/Failed/Exit events come in too early. (Bitbake rev: af63abe88327fd5c1b3d7c00a84d9e408ef23285) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: proper exit code on toaster errorsAlexandru DAMIAN2015-05-081-5/+6
| | | | | | | | | | | | | | | | This patch modifies the toasterui to properly return the exit code based on the errors found in the toaster itself. The upload event file API call will not delete event logs for which toasterui showed an error. This will facilitate debugging. Minor enhancement in the buildinfohelper to reduce the number of lookups on unknown layer objects (prevented testing of the patch). (Bitbake rev: 1ddd6a9e4280a4adf971132ff1fe7ec9b3252905) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>