aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-04-05toaster: reorder migrationselliot/toaster/project-build-dir-cancel-dldir_sstatedired/toaster/project-build-dir-cancel-dldir_sstatedirEd Bartosh
Renamed migrations with the same prefix. Changed dependencies to set correct order. Removed unneeded _merge migrations. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-04-05toasterui: update build in internal stateEd Bartosh
buildinfohelper stores current Build object in its internal state. Any changes to Build object will be lost if internal state is not updated as current buildinfohelper code saves Build object from internal state when build is completed. This bug causes incorrect build state when build is cancelled. Updating internal state should fix it. Note, that this commit updates internal state after status of the build is changed to Build.CANCELLED. There are several other places in the code where Build object is updated without updating internal state. They should be carefully analyzed and fixed. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-04-05buildinfohelper: fix KeyErrorEd Bartosh
When bitbake doesn't need to build anything it still sends ImagePkgList event with empty 'pkgdata', 'imgdata' and 'filedata' fields. This causes crash in buildinfohelper code as it's assumed that above mentioned fields always have data keyed by build target: ERROR: u'core-image-minimal' Traceback (most recent call last): File "toasterui.py", line 423, in main buildinfohelper.store_target_package_data(event) File "buildinfohelper.py", line 1218, in store_target_package_data imgdata = BuildInfoHelper._get_data_from_event(event)['imgdata'][target.target] KeyError: u'core-image-minimal' Fixed this by using dict.get method with empty dictionary as default return value instead of trying to get value without checking if target key is in the data. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-04-05toaster: get bitbake location from BBBASEDIREd Bartosh
It was incorrectly assumed in the current code that bitbake is in ../bitbake/bin/ directory. It's not always the case. Using bitbake from $BBBASEDIR should be . Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-04-05toaster: export BBBASEDIR variableEd Bartosh
This variable will be used in localhost controller code to determine correct bitbake location, so it has to be exported. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-04-05toaster: update projectconf.html for DL_DIR and SSTATE_DIRSujith 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-04-05toaster: 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-04-05toaster: add DL_DIR and SSTATE_DIR to oe toasterconfEd Bartosh
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-04-05toaster: 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-04-05toaster: 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 doesn't allow clients with non-empty tokens to connect to the server. Specifying empty token should stop generation of random token and make it possible for clients to communicate with the server. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-04-05toaster: fix conflicting migrationsEd Bartosh
Fixed by running manage.py makemigrations --merge Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05buildinfohelper: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toasterui: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toasterui: 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-04-05buildinfohelper: 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-04-05uievent: 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-04-05toasterui: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-05toaster: 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-04-03bitbake: siggen: Ensure tainted stamps are accounted for with writing custom ↵Richard Purdie
stamps sstate.bbclass for example writes siginfo files to a separate location but we need to read taint data from the standard path. (Bitbake rev: da444c9761ee15a59ea8880e3f812a5d3f1a1aaa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03bitbake: siggen: Fix nostamp taint handlingRichard Purdie
The taint values need to be passed from the server to the workers to ensure they see the same stamp values. Also ensure that the "nostamp:" prefix isn't included in the checksum value to match the server calculation. This ensures the checksums are all consistent. (Bitbake rev: f80ba20e90f3746f7faee3e0ff7f249025fec8ee) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03bitbake: siggen: Add checksum recalculation/checking codeRichard Purdie
In theory all the information to recalcuate the task signatures was written into the siginfo/sigdata files. In reality, some of the information was written into the filename. Firstly this patch duplicates that info into the file itself just for easy of use since its small. Secondly, we abstract out the existing "calculate the checksum" code for the taskhash, and add a function to calculate the bashhash based on the informaiton within the file. Finally, we call these functions when we're writing out the data to check that the data we're writing is consistent. I've found a couple of places it wasn't and its good to know about these in advance, rather than having a siginfo/sigdata file which a given hash in its filename but a contents which give a different result. This should all combine to avoid a certain class of checksum bugs making it into world, and identifying problems in advance. (Bitbake rev: 0f50a18d7a0ea0d68edd8e5217e29111f4b1ea0b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03bitbake: siggen: Fix check calculation problem with file_checksumsRichard Purdie
When I enabled debugging of the checksum code, I found the value calculated from siginfo/sigdata files for do_fetch tasks never matched. This was due to an error in the way the data was being stored for these, it wasn't ordered correctly. This patch fixes things so the checksums calculated from siginfo/sigdata files is correct when file checksums are present. (Bitbake rev: 046c1be7594fae2eec3d1f242ba3e9a85f1a1880) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03bitbake: siggen: Drop misleading duplicate methodRichard Purdie
The real method is a few lines later, this one is incorrect and just causing confusion. Remove it. (Bitbake rev: a896f263300f069400eae533be0daf5dedf41c95) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-03bitbake: tests/fetch.py: Improve unit tests for trusted network checkOlof Johansson
The tests were skipped when running without network even though they didn't require network. This commit also adds a test case for URLs with ports in them (the ports should not be considered when doing trusted network checks). (Bitbake rev: 77747de6b20538063eef3b188489a35bef225359) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>