aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-03-19toaster: update projectconf.html for DL_DIR and SSTATE_DIRsujith/set_dldir_sstatedirv2Sujith H
Modified the projectconf.html to include DL_DIR and SSTATE_DIR. Updated the script section in the html to handle the changes made by the user on DL_DIR and SSTATE_DIR. Included validation check for the folder names. [YOCTO #8422] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-03-19toaster: update view to support DL_DIR and SSTATE_DIRSujith H
Update toaster's views.py to support DL_DIR and SSTATE_DIR for page projectconf.html. Removed DL_DIR and SSTATE_DIR from blacklist. Initial value of DL_DIR and SSTATE_DIR comes from BuildEnvironment. [YOCTO #8422] Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-18toaster: add DL_DIR and SSTATE_DIR to oe toasterconfEd Bartosh
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-18toaster: add DL_DIR and SSTATE_DIR to poky toasterconfSujith H
[YOCTO #8422] Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: use empty tokenEd Bartosh
If client xmlrpc token is not provided in the command line, bitbake generates random token. Server token in --server-only mode is always empty. This prevents clients with non-empty tokens to communicate with the server. Specifying empty token should prevent generation of random token and makes it possible to communicate with the server. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: fix conflicting migrationsEd Bartosh
Fixed by running manage.py makemigrations --merge Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: runbuilds Clean up runbuildsMichael Wood
- Organise the imports into logical groups - Fix 80 col wrapping - Remove catch all exceptions - Log to the toaster log - Use QuerySet functions such as .first() and Q() Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-03-17toaster: runbuilds Make runbuilds aware of the build CANCELLED stateMichael Wood
Add handlers to make sure we remove the BuildEnvironment LOCK when we have cancelled a build. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-03-17toaster: models Exclude the CANCELLED builds from get_number_of_buildsMichael Wood
Don't count CANCELLED builds when returning the number of builds. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-03-17toaster: mrb_section template Add build cancel buttonMichael Wood
Add the cancel build button to the mrb section template and add the event handlers to cancelABuild. Also clean up the calls to startABuild to use the updated libtoaster methods and to make the code consistent with it's cancelABuild counterpart. Co-Author: Sujith H <sujith.h@gmail.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-03-17toaster: tables BuildsTable exclude cancelled buildsSujith H
Exclude cancelled builds from showing in the builds table [YOCTO #6787] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-03-17buildinfohelper: Add handler for cancelling a buildMichael Wood
When a build is cancelled the build (action) is complete if it has been caused the request being cancelled then update the build outcome accordingly. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-03-17toaster: bldcontrol models Add a cancelling state the BuildRequestMichael Wood
To accurately reflect the state of a build request we also need a cancelling state. This is set when we've started a build and then for whatever reason cancel it, cancelling is not instantaneous so we have this state to indicate that a cancel is in progress. Also add a state transition guard. As the state of a BuildRequest can currently be modified by three processes; Toastergui, Runbuilds/bldcontrol and the buildinofhelper we cannot say for sure which process will be running at the time of cancellation so in order to avoid one of these processes making an incorrect transition only allow transitions of state to increase. e.g. CREATED -> QUEUED -> INPROGRESS And to ignore such requested changes such as INPROGRESS -> CREATED Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-03-17toaster: models Add cancelled state to build outcomeSujith H
A new state CANCELLED is introduced to, distinguish the state of build. [YOCTO #6787] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-03-17toaster: update BuildEnvironmentController and BitbakeControllerSujith H
Remove getBBController function from BuildEnvironmentController. The constructor of BitbakeController is updated appropriately so that call can be made to connect to running server. The call to startBBServer is removed from bbcontroller and handledin localhostbecontroller. [YOCTO #6787] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-03-17toaster: libtoaster Update implementation of startABuild and cancelABuildMichael Wood
Update the implementation of startABuild and cancelAbuild to reflect changes to the backend api. We now have a dedicated endpoint to make calls into so add this url to libtoaster.ctx and allow passing null in as a url value to indicate that we want to use the current project Also: - Fix some documentation comments - Add the convenience of passing in an array of targets to startABuild Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-03-17toaster: xhr Update the implementation of the build cancellation requestMichael Wood
Update the implementation of the backend api for cancelling builds with the new cancelling BuildRequest state and cancelled Build state. Also added some docstring about general usage. Co-Author: Sujith H <sujith.h@gmail.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-03-17toaster: Move xhr calls for starting and stopping buildsMichael Wood
Move the backend xhr implementation of the build request changes into it's own file and out of the ToasterTable definition. It used to live in the views.py but in a hope of starting to collate logical groups of views move this to a new file called api. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-03-17toaster: bldcontrol Add forceShutDown function to BitbakeControllerSujith H
Add forceShutDown function to BitbakeController class. This function provides a mechanism to cancel the build from toaster. An API which can be used safely to cancel build and hence shutdown running bitbake server. [YOCTO #6787] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-03-17toasterui: shutdown on BuildCompleted eventEd Bartosh
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toasterui: detect build run start correctly on JethroElliot Smith
We currently use the TargetsAcquired event fired by the XMLRPC server to mark the start of a build run from the command line. At this point, we create the Build object in buildinfohelper, then append targets etc. to it as the run continues. However, on Jethro, this event isn't fired. This means that we can't support builds with the Jethro release correctly, as a Build object is never created. Add a condition so that we can create a Build object when building with Jethro by falling back to the BuildStarted event. Jethro builds which fail early (bad target, bad MACHINE, bad DISTRO etc.) will not be captured (as we need the TargetsAcquired event for that), but other builds which succeed or fail later will be captured. Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-03-17toaster: use bash explicitlyEd Bartosh
Toaster can't run builds on Ubuntu as default /bin/sh points to dash there. The reason is that oe-init-build-env can't be sourced under dash for various reasons. It can be fixed or work arounded, but it wouldn't fix builds for older releases. Explicitly using bash to start builds should fix the issue. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: fix jethro buildEd Bartosh
The keys 'started', 'ended', 'cpu_time_user', 'disk_io_read' and 'disk_io_write' were added to the event recently, so they don't exist in the events generated by bitbake server from older releases. Checking if task_to_update structure has these keys before using them should fix build of older releases. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: update conf/local.confEd Bartosh
Added 'INHERIT+="toaster buildhistory"' line to the conf/local conf when Toaster starts. It should make commandline builds to provide all required information to Toaster backend. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: stop bitbake server after the buildEd Bartosh
Bitbake server is used only during the build. There is no need in keeping server running after the build. Running bitbake -m in the subshell after the build should stop the server. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: add new parameter to _shellcmdEd Bartosh
Added 'nowait' parameter to _shellcmd method to support running chain of commands in a subshell. This is going to be used to stop bitbake server after the build. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: reimplement triggerBuildEd Bartosh
Reimplemented triggerBuild method to support one build directory per project: - start bitbake server from the cloned repository - don't run observer - run bitbake build directly instead of triggering it through xmlrpc [YOCTO #7880] [YOCTO #9058] [YOCTO #8958] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: modified setLayers APIEd Bartosh
Removed updating of bblayers.conf. It will be done in runBuild method. Changed return value: return list of layers. Removed _updateBBLayers method. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: add brbe parameter to triggerBuildEd Bartosh
Called triggerBuild with brbe parameter instead of adding TOASTER_BRBE variable to the database and fetching it in triggerBuild. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: remove release APIEd Bartosh
This API is quite dangerous as it removes build directory. It's not used anywhere and most probably will not be used in future as toaster is going to have one build directory per project. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: remove startBBServer APIEd Bartosh
We still will have to run bitbake server, but it will be done different way and the code will be in triggerBuild function. Removed startBBServer API from BuildEnvironmentController and LocalhostBEController classes. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toasterui: fix brbe reportingEd Bartosh
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17buildinfohelper: improve handling of providermapEd Bartosh
DepTreeGenerated event doesn't contain 'providermap' data in jethro. Modified buildinfohelper to handle events without this data. This should make it possible to handle jethro events coming from jethro bitbake server by the latest buildinfohelper. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17uievent: improve BBUIEventQueue codeEd Bartosh
Return value of self.BBServer.registerEventHandler differs between jethro and master. To be able to build jethro toaster should be able to communicate with jethro bitbake server i.e. it must work with both old and new registerEventHandler call. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toasterui: add brbe parameter to buildinfohelperEd Bartosh
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: set BITBAKE_UI environment variableEd Bartosh
Set BITBAKE_UI variable to 'toastergui' for command line builds to use toasterui as a default ui module for bitbake. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: get rid of noui optionEd Bartosh
noui command line option doesn't makes sense anymore as toaster doesn't run bitbake. It should be safe to to remove it. The purpose of this option was to skip running bitbake observer process. This was never used before as it's not possible to run toaster build without running observer. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toaster: don't start bitbake serverEd Bartosh
From now on toaster script will not run bitbake server. It will be started by runbuilds and stopped after the build. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-03-17toasterui: remove ParseStarted from the event listEd Bartosh
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 Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-03-17toasterui: Remove the excessive exception loggingMichael Wood
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. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-03-17bitbake: xmlrpc: set single use mode differentlyEd Bartosh
Currently xmlrpc server implicitly sets itself into single use mode when bitbake server is started with anonymous port (0) or no port is provided in command line. In this mode bitbake shuts down xmlrpc server after build is done. This assumption is incorrect in some cases. For example Toaster uses bitbake in this mode and expects xmlrpc server to stay in memory. Till recent changes single use mode was always unset due to the bug. When the bug was fixed it broke toaster builds as Toaster couldn't communicate with bitbake server in single use mode. Reimplemented logic of setting single use mode. The mode is explicity set when --server-only command line parameter is not provided to bitbake. It doesn't depend on the port number anymore. [YOCTO #9275] [YOCTO #9240] [YOCTO #9252] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-03-16toaster: buildinfohelper Create target list for all types of buildMichael Wood
Create the target list cache for command line builds and toaster triggered builds. This fixes a regression where the target is not identified as an image after building as the target cache is empty for toaster triggered builds [YOCTO #9266] Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-03-10toaster.bbclass: show packages that were setscened into existence toobrian avery
We were previously ignoring pkgs that came in from a setscene like from an sstate mirror). With this patch we can use pkgs than come from sstate for image customisation as well. Also remove unused variable. [YOCTO #9137] Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-03-10toaster: create Build object earlier in bitbake processingElliot Smith
If a build fails because of a bitbake error occurring before the BuildStarted event fires, we do not generate a Build object for command-line builds. This means that failed command-line builds don't appear in Toaster at all. To resolve, split build creation into two steps: 1. Just before buildTargets() is invoked on the XMLRPC server: create the base Build object. Note that as soon as a Toaster-triggered build starts, targets are added to it; but this event is the earliest point when task and targets are available for command-line builds. (This requires a new TargetsAcquired event to be fired by the XMLRPC server when the buildTargets() command is called.) 2. BuildStarted event: add any layer information to either type of build (command-line or Toaster-triggered). Note that the build_name property cannot be set until BuildStarted, as it is not available until then, which could cause problems for creating Build objects earlier; however, this property is redundant, as it's never used anywhere in Toaster, so it has been removed (along with any functions which refer to it). [YOCTO #8440] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-03-10toaster: update the meta-yocto toaster configuration fileBelen Barros Pena
It looks like the master branch will no longer build with the Fido release, so remove all references to fido and make sure that the file sets up local, master and jethro releases. Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
2016-03-10toaster: update the openembedded-core toaster configuration fileBelen Barros Pena
It looks like the master branch will no longer build with the Fido release, so remove all references to fido and make sure that the file sets up local, master and jethro releases. Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
2016-03-09bitbake: server/process: Try connecting 4 times before giving upLucas Dutra Nunes
Instead of trying one time with a timeout of 20 seconds try 4 times with a timeout of 5 seconds, to account for a slow server start. (Bitbake rev: 4a7fe63126dd8177baa5ad21e59e0bebeea8c596) Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09bitbake: toaster: models List only have the specified project's imported layersMichael Wood
When returning the compatible layers make sure that we are only listing: All the layers which are for this release && configuration layers (i.e. aren't part of the build history) and which aren't an imported layer OR are this project's imported layer(s). [YOCTO #8944] (Bitbake rev: de8baedaccb451c12bc3f642449db3f64aed6bf7) 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>
2016-03-09bitbake: toaster: rework task buildstats storage and displayElliot Smith
The data available from buildstats is now more fine grained than previously, so take advantage of that to enrich the data we save against tasks: * Store the CPU usage for user and system separately, and display them separately. * Disk IO is now measured in bytes, not ms. Also store the read/write bytes separately. * Store started and ended times, as well as elapsed_time. This will enable future features such as showing which tasks were running at a particular point in the build. There was also a problem with how we were looking up the Task object, which meant that the buildstats were being added to new tasks which weren't correctly associated with the build. Fix how we look up the Task (only looking for tasks which match the build, and the task and recipe names in the build stats data) so the build stats are associated with the correct task. [YOCTO #8842] (Bitbake rev: efa6f915566b979bdbad233ae195b413cef1b8da) 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>
2016-03-09bitbake: toaster: use force_bytes to display non-ascii project namesSujith H
When user enters a non-ascii character in the project name of toaster, the build doesn't get triggered. Use force_bytes to fix this. Also deal with non-ascii project names when logging the build request in runbuilds. [YOCTO #9071] (Bitbake rev: b6141c4d170885d3bdf63074afcb1e41fde0a8f0) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>