summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol/bbcontroller.py
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: lib: remove unused importsFrazer Clews2020-01-191-3/+1
| | | | | | | | | | removed unused imports which made the code harder to read, and slightly but less efficient (Bitbake rev: 4367692a932ac135c5aa4f9f2a4e4f0150f76697) Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Strip old editor directives from file headersRichard Purdie2019-05-041-3/+0
| | | | | | | | | | There are much better ways to handle this and most editors shouldn't need this in modern times, drop the noise from the files. Its not consitently applied anyway. (Bitbake rev: 5e43070e3087d09aea2f459b033d035c5ef747d0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Drop duplicate license boilerplace textRichard Purdie2019-05-041-13/+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: toaster: move to new bitbake xmlrpc defaultDavid Reyna2017-07-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The bitbake option "-t SERVERTYPE" was deprecated and can be removed since the desired XMLRPC listener now the default. The bitbake server port cannot be "-1" anymore and must be explicitly passed. There is a race condition for the bblock file to not only be created but to actually be populated, so a delay test loop is required (usually only one pass). The 'xmlrpcclient' is now the class that allows Toaster to for example kill builds. The events for populating the recipe parsing now either show only the final result or are skipped entiredly, so the progress calculator needs to be changed to not block on the parsing phase. [YOCTO #11851] (Bitbake rev: 2aa7ad38f760ec003fb18faa5aa0014cff191a7a) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: moved import bb.server.xmlrpcEd Bartosh2016-06-021-1/+1
| | | | | | | | | | | | | | Moved import xmlrpc module to the place where it's used to avoid toaster crashes when importing bitbake code. NOTE: This patch is made to be able to partly test toaster with bitbake from master. It can be removed as soon as bb.server.xmlrpc is ported to python 3. (Bitbake rev: 0c5d691746fb02807568a8a470969a0b68e21915) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix local importsEd Bartosh2016-06-021-1/+1
| | | | | | | | | | | | | | Replaced local imports with absolute imports. Used .module for local imports. This should make the code to work on python 2 and python 3. [YOCTO #9584] (Bitbake rev: 3f1e68c783308dcb51242d0fdeef758e581ccc8c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update BuildEnvironmentController and BitbakeControllerSujith H2016-04-061-22/+4
| | | | | | | | | | | | | | | | 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] (Bitbake rev: e15151106aae21d3b164ca868be42bd63905f0a1) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: bldcontrol Add forceShutDown function to BitbakeControllerSujith H2016-04-061-0/+3
| | | | | | | | | | | | | | | 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] (Bitbake rev: 89dc2ee8f5b7255538082ce4f6cb5277839875a8) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: modified setLayers APIEd Bartosh2016-04-061-18/+0
| | | | | | | | | | | | Removed updating of bblayers.conf. It will be done in runBuild method. Changed return value: return list of layers. Removed _updateBBLayers method. (Bitbake rev: 198bf7e6b8d7f847f2619b71c6bd86a9a76156c9) 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: remove release APIEd Bartosh2016-04-061-6/+0
| | | | | | | | | | | | 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. (Bitbake rev: ef9e126227d3bdee86c1592e2baa43d21e6a32df) 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: remove startBBServer APIEd Bartosh2016-04-061-9/+0
| | | | | | | | | | | | | | 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. (Bitbake rev: a8f986d73a84f28fa8b116b91fb30c5d2cd4edbe) 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: don't use sshbecontrollerEd Bartosh2016-03-071-6/+0
| | | | | | | | | | | Removed usage of sshbecontroller from bbcontroller, models, tests and database schema. (Bitbake rev: 3ee06eb7e96de5dba539ad52201867e77d06a53e) 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: toaster: raise NotImplementedErrorEd Bartosh2016-03-071-5/+5
| | | | | | | | | | | | | | | Raised NotImplementedError instead of Exception to be able to catch it. This is a preparation for removing sshbecontroller module. It has to be done as code in bldcontrol/tests.py imports custom NotImplementedException from sshbecontroller. (Bitbake rev: c243ab6c83fe12d84777e4c3a18fd393827b9327) 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: toaster: use OneToOneField instead of ForeignKeyEd Bartosh2015-12-141-2/+2
| | | | | | | | | | | | | | | Used OneToOneField to reference BuildRequest in BRBitbake model. Fixed django warning: WARNINGS: Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. (Bitbake rev: aaa4319ebbb06facb77b4ba936cf3aa2068ff238) Signed-off-by: Elliot Smith <elliot.smith@intel.com> 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: toaster: implement BitbakeController.triggerEventEd Bartosh2015-12-141-0/+3
| | | | | | | | | | | This API will be used to pass data from Toaster to toaster_ui and buildinfohelper. (Bitbake rev: 6dca6fd47c5e8d66687fb07177e98cd531cd971d) 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: remove writeConfFile APIEd Bartosh2015-12-071-6/+0
| | | | | | | | | | | | This API is not used anymore as toaster doesn't write variables to configuration files anymore. It sets variables through its connection to bitbake server. (Bitbake rev: 6dda2916b75d688874d208192d5c7cdb302eec35) 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: toaster: implement BitbakeController.getVariableEd Bartosh2015-12-071-0/+3
| | | | | | | | | | | | Added new API to get value of bitbake variable from bitbake server. The API will be used to update INHERIT variable instead of writing it to the toaster configuration files. (Bitbake rev: effc371e3a4a2262e53e9e560c7c08cffad195da) 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: toaster: remove stopBBServer APIEd Bartosh2015-12-071-6/+0
| | | | | | | | | | | | Removed stopBBServer API from build controller as toaster doesn't stop bitbake server anymore. It's reused for both types of builds: triggered by UI and started manually. (Bitbake rev: 0cad802da171d51814f22cc9383f496a63cd0c75) 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: toaster: fix pylint errorsAlexandru Damian2015-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | 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: toaster: improve the buildenvironment APIAlexandru DAMIAN2015-06-261-0/+3
| | | | | | | | | | | | | | | We improve the buildenvironment API by reducing it to a single command: triggerBuild. This command is specifically implemented in each BE controller type, so the runbuilds management command is only concerned with scheduling the next build, and not with the details of how a build is actually started. (Bitbake rev: 7ee0f1da0a8fcac37419ffdddbe35a9268a1ded4) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: improvements in layer selection logicAlexandru DAMIAN2015-02-101-13/+0
| | | | | | | | | | | | | | | | This patch clearers and bring fixes for the layer selection logic in order to enable information collected during build to be used in configuring projects, specifically targeting the recipes learned through the building process. The patch also adds tests to verify the layer selection logic. [YOCTO #7189] (Bitbake rev: f0faba8ef0f08c98ac4bddf5b3954d540820d215) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: proper setup for build configurationAlexandru DAMIAN2015-02-021-8/+8
| | | | | | | | | | | | | | | This patch makes sure that all the toaster conf files are actually written from the build enviroment controllers. Additionally, toaster checks that the 'daemon' program, which is used to start the build system, is available (currently for localhost). [YOCTO #7171] (Bitbake rev: 0a1db7d1531f8254955e1152bcd8e6db4ec1d277) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: new layer checkout logicAlexandru DAMIAN2015-01-301-4/+9
| | | | | | | | | | | | | | | | | | | This patch implements a new layer checkout logic that brings more flexibility in getting layers under different commits work with Toaster. The new hibrid logic will checkout separately each layer and commit id; the task execution will be delegated to the checkedout bitbake, but the data logger will be executed from the current toaster version as to bring in enough data to sustain the updates in UI models. [YOCTO #7171] [YOCTO #6892] (Bitbake rev: c6eb0f7f16c59530c2525b2e5629fe86de4e8f0f) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: write pre-read conf file for build variablesAlexandru DAMIAN2015-01-081-0/+5
| | | | | | | | | | | | | | | We change the setting of variables from directly injection into the set-up cooker to writing a conf file that is pre-read on bitbake server startup. This is needed because the injection can only happen after the variable set is parsed, and the variables already inferred, so setting up variables happens too late. [YOCTO #7045] (Bitbake rev: 854f680b5b9d2d0fa796af84cb1218545fbfc55a) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster script: webport option and other improvementsAlexandru DAMIAN2014-11-121-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | We add the "webport=" command line option as to allow starting the web server on a custom port. The bitbake server port is now auto-allocated. This is needed to be able to run multiple toaster environments on a single machine. We tackle bug 6023 (toaster refusing to start when lock file is present) by using more specific checks, and automatically recover from bitbake server down / webserver up error mode. Command line parameters are now read on both interactive and managed modes. The localhost and ssh controllers are updated to work with the modified toaster launcher script. [YOCTO #6023] (Bitbake rev: cd3eb5b051743463cfe51dba97cae4da75420048) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: change startup parameter passing to avoid raceAlexandru DAMIAN2014-10-301-3/+3
| | | | | | | | | | | | | | We avoid a race between the setting the TOASTER_BRBE variable and reading the variable in toaster ui by supplying the variable at server startup time through the toaster.conf post-read file. Additional small changes are included, including marking the build request with the environment id of where the build took place. (Bitbake rev: 7c333350418c4140e6c988c5272940f8057d327d) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: enable SSH-based remote build supportAlexandru DAMIAN2014-09-051-158/+12
| | | | | | | | | | | | | | | | We enable support for starting builds on remote machines through SSH. The support is limited to poky-based distributions. We refactor localhost build support and we update bldcontrol application tests to uniformely test the APIs of localhost and SSH build controllers. [YOCTO #6240] (Bitbake rev: c2ad9c9bb83f61c171434324df8c4d5ee655a556) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update the bldcontrol to the new orm modelsAlexandru DAMIAN2014-08-291-11/+24
| | | | | | | | | | | | | | | | We update the build controller application to make proper use of the bitbake specification in project settings. Added heuristic to detect when the meta* layers and bitbake are checked out from Yocto Project poky, and use a single git checkout. Building without a proper oe-init-build-env is not yet supported. (Bitbake rev: 9eafe14956013f5af39b68fc93e1b03e7ea1f5c2) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: properly set layers when running a buildAlexandru DAMIAN2014-07-231-15/+93
| | | | | | | | | | | | | | | | | | This patch enables the localhost build controller to properly set the layers before the build runs. It creates the checkout directories under BuildEnvironment sourcedir directory, and runs the build in the buildir directory. Build launch errors are tracked in the newly added BRError table. These are different from build errors, in the sense that the build can't start due to these errors. (Bitbake rev: 1868d5635b517e0fe1b874674ea7a78910b26e2e) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add fields for sourcedir and builddir pathsAlexandru DAMIAN2014-07-231-26/+25
| | | | | | | | | | | | | | | | | | We add explicit absolute paths for a directory where the layer sources will be checked out (sourcedir) and where the build activities will take place. Adding minimal checking when starting the application in order to make sure that BuildEnvironment (BE) settings are usable. This check is ran by the toaster script at startup. Modify the localhost bbcontroller to use the BE settings instead of trying to self-configure on checked out sources. (Bitbake rev: d17500d3f73fdeeef5f11fb3773a65e927be3f02) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: build control functionalityAlexandru DAMIAN2014-06-131-0/+239
We add the build control functionality to toaster. * The bldcontrol application gains bbcontroller classes that know how to manage a localhost build environment. * The toaster UI now detects it is running under build environment controller, and update the build controller database and will shut down the bitbake server once the build is complete. * The toaster script can now run in standalone mode, launching the build controller and the web interface instead of just monitoring the build, as in the interactive mode. * A fixture with the default build controller entry for localhost is provided. [YOCTO #5490] [YOCTO #5491] [YOCTO #5492] [YOCTO #5493] [YOCTO #5494] [YOCTO #5537] (Bitbake rev: 10988bd77c8c7cefad3b88744bc5d8a7e3c1f4cf) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>