summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: bitbake: implement idle timeout for xmlrpc serverEd Bartosh2016-07-212-4/+22
| | | | | | | | | | | | | | Idle timeout can be specified either by -T/--idle-timeout option or by sessing BBTIMEOUT environment variable. Bitbake xmlrpc server will unload itself when timeout exprired, i.e. when server is idle for more than <idle timeout> seconds. [YOCTO #5534] (Bitbake rev: 5fa0b3a19e7d0f40790f737abeddf499d53f1f6a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: implement --foreground command line optionEd Bartosh2016-07-211-1/+11
| | | | | | | | | | This option makes bitbake xmlrpc server to run in foreground. It should be useful for debugging purposes. (Bitbake rev: 9d4254be5853a546a346bf0d19919dcfba12773d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Added new section on command-line executionScott Rifenbark2016-07-211-0/+19
| | | | | | | | | Needed a section on executing a list of task and recipe combinations. (Bitbake rev: 6f6cd0674fd1595f4e74b7da692e0c348b2660c6) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Applied review edits to "Recursive Dependencies"Scott Rifenbark2016-07-211-1/+2
| | | | | | | | | | | | Added a minor tweak to the third paragraph to be more inclusive of the topic. Fixes [YOCTO #9970] (Bitbake rev: a5d36e8bccf35ffbca41a4facaa041d36f587529) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Fixed typo in the BBDEBUG variable description.Scott Rifenbark2016-07-211-1/+1
| | | | | | | | | | | | In the BBDEBUG variable description, the "-d" parameter needed to be "-D". Fixed it. Fixes [YOCTO #9950] (Bitbake rev: 475e7611f6c5b884d86152cb0b334e9d96849608) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Added review changes to BBCLASSEXTEND descriptionScott Rifenbark2016-07-211-7/+9
| | | | | | | | | | | | | Fixes [YOCTO #9909] Added some technical clarifications to the existing note to be clear about what is causing the limitations in this case. Applied some formatting fixed to for the use of the include word. (Bitbake rev: e9ad2e0f6d2681dd793cc39c468eb86e57fd6f48) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Added review changes to recursive section.Scott Rifenbark2016-07-211-1/+14
| | | | | | | | | | | | | Applied formatting to a "after" word that should be <filename>after</filename>. Also added a new clarifying paragraph in the "Recursive Dependencies" section. Fixes [YOCTO #9861] (Bitbake rev: ada90f68afd17cb85cb5957f3f91b537ee3599f6) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Addeds support for the Perforce FetcherAndrew Bradford2016-07-212-6/+74
| | | | | | | | | | | | | Added a new Perforce Fetcher section in the same spirit as the existing sections for other supported fetchers. Changes included the new section, removal of the bulleted item that mentioned this fetcher as an "additional" fetcher, and the creation of a new variable in the glossary named P4DIR. (Bitbake rev: 47e03b1789ee1c18407dbac33a6c235752019865) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Added clarifying note to BBCLASSEXTEND variable.Scott Rifenbark2016-07-211-0/+21
| | | | | | | | | | | | Fixes [YOCTO #9909] Added a note that talks about how the BBCLASSEXTEND mechanism adds recipe variants. (Bitbake rev: 185c9c5fc205fe9c9daf5238f11b92bd0954f5c6) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Added a note providing examples of task ↵Scott Rifenbark2016-07-211-0/+34
| | | | | | | | | | | | | | | dependencies Fixes [YOCTO #9861] In the "Dependencies internal to the .bb File" section, I placed a note providing more detail on how recipes are built regarding task dependency. (Bitbake rev: c2e72928fbd21d622860a54a55f4239ba27c07a2) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Updated dependency section for tasksScott Rifenbark2016-07-211-9/+26
| | | | | | | | | | | | | Fixes [YOCTO #9861] I updated the section on dependencies to give a couple of examples for task dependencies within a single recipe and dependencies for tasks between two individual recipes. (Bitbake rev: 231deeb2b0b3847cba971ca30c16e29357100ae6) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Updated the defaults for getVar and getVarFlagScott Rifenbark2016-07-211-5/+5
| | | | | | | | | | | There is no default. Fixes [YOCTO #9683] (Bitbake rev: 886afd6d876c9ae04cf681931db8f1774dc53096) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Added new section on command-line executionScott Rifenbark2016-07-211-0/+19
| | | | | | | | | Needed a section on executing a list of task and recipe combinations. (Bitbake rev: 17f7f366df3a5951ae88e24c43aecf3d65d83c14) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: Fix incorrect dot file generationRichard Purdie2016-07-201-1/+1
| | | | | | | | | | In the runqueue cleanup/conversion, "dep" was mistakenly used where "tid" should be leading to incorrect task-depends.dot files and causing general confusion. Fix this, its clearly incorrect looking at the code. (Bitbake rev: 689730dbb068c5ea3593e7b92fe5d5e5c0c3760a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster-tests: add class SeleniumTestCaseBase for browser testsAníbal Limón2016-07-201-181/+3
| | | | | | | | | | | | | | | | | In order to reuse the Selenium helper outside a Django environment (for functional testing), add a new module containing the base class SeleniumTestCaseBase, which only inherits unittest.TestCase Add a class SeleniumTestCase with multiple inheritance of StaticLiveServerTestCase and SeleniumTestCaseBase to prevent existing tests from breaking. (Bitbake rev: 1177b3f368d8b7f8557eb649adb2e327b6df801c) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: main: implement server autostart featureEd Bartosh2016-07-201-5/+16
| | | | | | | | | | | | | | | | If environment variable BBSERVER == 'autostart' bitbake will automatically load server if it's not running yet. If host and port are in bitbake.lock then bitbake tries to check if server is running and responses to commands and starts new server only if this check fails. [YOCTO #5534] (Bitbake rev: 89c6e625d47303b2aad8e6645762f17aee01b2d4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: utils: add BBSERVER to the list of preserved variablesEd Bartosh2016-07-201-0/+1
| | | | | | | | | | | | | All environment variables that are not in the list returned by preserved_envvars_exported are cleaned by bb.utils.clean_environment. Added BBSERVER to the list as we need to access it in bb/main.py after the call of bb.utils.clean_environment. (Bitbake rev: 15c4ea679f4fe097a9f21cccfc82907b5f39a4e4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: xmlrpc: implement check of connection to serverEd Bartosh2016-07-201-0/+17
| | | | | | | | | | | | | | | | | Implemented check_connection function. The purpose of this function is to check if bitbake server is accessible and functional. To check this this function tries to connect to bitbake server and run getVariable command. This API is going to be used to implement autoloading of bitbake server. [YOCTO #5534] (Bitbake rev: 1a18f5ceb478f766b53850451549333f655621ea) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils: no need to unsetenv when manipulating os.environRoss Burton2016-07-201-1/+0
| | | | | | | | | | Doing both os.unsetenv(foo) and then del os.environ[foo] is pointless as del will call unsetenv automatically. (Bitbake rev: a4463e2ff3c7d234320176d671719243292f1af0) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: implement progress supportPaul Eggleton2016-07-194-8/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement progress reporting support specifically for the fetchers. For fetch tasks we don't necessarily know which fetcher will be used (we might initially be fetching a git:// URI, but if we instead download a mirror tarball we may fetch that over http using wget). These programs also have different abilities as far as reporting progress goes (e.g. wget gives us percentage complete and rate, git gives this some of the time depending on what stage it's at). Additionally we filter out the progress output before it makes it to the logs, in order to prevent the logs filling up with junk. At the moment this is only implemented for the wget and git fetchers since they are the most commonly used (and svn doesn't seem to support any kind of progress output, at least not without doing a relatively expensive remote file listing first). Line changes such as the ones you get in git's output as it progresses don't make it to the log files, you only get the final state of the line so the logs aren't filled with progress information that's useless after the fact. Part of the implementation for [YOCTO #5383]. (Bitbake rev: 4027649f422ee64b1c4e1ad8d48ac295050afbff) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster-tests: package count/size shouldn't show for non-image buildsElliot Smith2016-07-192-8/+63
| | | | | | | | | | | | | | If a build doesn't produce any image files, the package count and size shouldn't be shown. Also add some metadata to build dashboard elements so it is clear what they're for, and so they can be queried by the tests. (Bitbake rev: 3d5090af4475b1d0bb56911a8e30abf9097c1b3c) 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-tests: new custom image button shouldn't show for non-image ↵Elliot Smith2016-07-191-0/+20
| | | | | | | | | | | | builds [YOCTO #9514] (Bitbake rev: 9bc014d89434400c1493fa9f07ce3a51d37dab51) 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-tests: add tests for build artifact display on build dashboardElliot Smith2016-07-194-7/+191
| | | | | | | | | | | | | | | | | | | | | | | Add tests for display of image, kernel and SDK artifacts on the build dashboard, checking that the "Images" option in the left-hand menu and the "Build artifacts" section display correctly for different types of build. Also add metadata to elements on the build dashboard so it's clearer what they represent, and to assist in finding them in the tests. Add a method to the test helper to make it more convenient to check whether a single element matching a selector exists. [YOCTO #8556] [YOCTO #8563] [YOCTO #9500] (Bitbake rev: 644a888ce5a2141f2e6e1c22430e196b65cb1313) 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: the customise image button shouldn't rely on targetsElliot Smith2016-07-192-9/+4
| | | | | | | | | | | | | | | | | | The build dashboard customise image button (for creating a new custom image based on an image recipe used by a build) shouldn't rely on targets: whether a new custom image can be created or not depends on whether any of the recipes used by the build are image recipes. Modify the method used to determine whether a build has customisable images to look at the image recipes used during the build, rather than whether the targets run by the build refer to image recipes. (Bitbake rev: 6648876c91134bda8498b4f8d7ace9147ec0d985) 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: add package manifest path to Target objectsElliot Smith2016-07-195-6/+54
| | | | | | | | | | | | | | | | | | | Store the path to the *.rootfs.manifest file for targets which generate images. A link to the package manifest is displayed in the build dashboard for targets which produce image files. Like the license manifest path, if a target would have produced the package manifest (but didn't, because it already existed), that path is copied from the target which did produce the package manifest. (Bitbake rev: 79b8e349a0da2ea6b97ad82daa5837e6dfffe0af) 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: better display of targets which produced no imagesElliot Smith2016-07-192-44/+36
| | | | | | | | | | | | | | | | | | | | | | | | | SDK targets (populate_sdk) produce SDK artifacts but no image files. Currently, these targets appear under the "Images" heading in the build dashboard, even though they aren't strictly image targets. Change the heading to "Build artifacts". Also remove the section which states that a build produced no image files: this is not correct for populate_sdk targets (those targets don't produce image files under any circumstances); and other changes mean that all targets which do produce images will now show those files. The check for whether to display the "Build artifacts" section also needs to change, as we show targets here which didn't produce any images but did produce SDK artifacts. [YOCTO #8556] (Bitbake rev: b4dce68045c4615e7a6a474e952f670721a3b54e) 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: show manifests in their own section of the build dashboardElliot Smith2016-07-191-4/+7
| | | | | | | | | | | | | | In the build dashboard, add a section for manifests to each target, which will contain the license and package manifests for a target. As we don't record the package manifest (yet), just move the license manifest link to that section for now. (Bitbake rev: 58cb685b567a081834a605530957f165d35fcf5e) 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: only show "New custom image" button for builds with image ↵Elliot Smith2016-07-192-20/+35
| | | | | | | | | | | | | | | | targets Add a has_image_targets() method to Build, and use that to hide the "New custom image" button on the build dashboard if a build has no targets which build images. [YOCTO #9514] (Bitbake rev: 3c4b053e44ea512ef2ced67289a7b0161db6ce9b) 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: use has_images() methods to display images correctlyElliot Smith2016-07-193-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the build dashboard, we had issues with showing images correctly, as we were using the is_image property of targets to determine whether a target would have image files. This property can be set to True if a target refers to an image recipe (e.g. "core-image-minimal"), even if the task used in the build didn't produce any image files. By adding has_images() methods to the Target and Build objects, which count associated Target_Image_File objects, we can correctly determine whether a target has image files associated with it, and if any of the targets for a build has image files. This means that we can screen out the left-hand "Images" menu options for builds which contained image-related targets (e.g. "core-image-minimal") but which didn't produce any images (e.g. "rootfs" task). [YOCTO #9500] [YOCTO #9784] (Bitbake rev: f6bba0ff254d5ed3163151d4b938f3a43c9acb0a) 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: buildinfohelper: only record image files for tasks which make imagesElliot Smith2016-07-191-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | If a target is built which is classified as an "image" target (e.g. "core-image-minimal"), Toaster reads the list of files in the image (from the files-in-image.txt file). However, Toaster continues to do this for builds which don't produce images, if the recipe providing the target is an image recipe. This can result in a list of files in the image being attached to a target which didn't produce an image (e.g. rootfs). When associating files with an image, ensure that only targets with a task which produces an image have "files in the image" associated with them. [YOCTO #9784] (Bitbake rev: 44375d0c2a88e0070b8067c9285b89c54eaf3152) 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: improve scan for SDK artifactsElliot Smith2016-07-197-139/+300
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: buildinfohelper: fix retrieval of targetsElliot Smith2016-07-191-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When buildinfohelper records the targets for a build, it looks up any existing targets for a build and creates them if they are not present. This is because in the case of Toaster-triggered builds, the Target objects have already been created (inside triggerBuild()) and don't need to be recreated; but in the case of cli builds, the Target objects have to be created by buildinfohelper. The issue is that the code for retrieving an existing target for a build only looks for Targets with a matching target and build, e.g. Targets for build X with target "core-image-minimal". But it is perfectly legitimate to call bitbake with a command like "bitbake core-image-minimal:do_populate_sdk core-image-minimal:do_populate_sdk_ext". In such a case, the code which looks for matching targets finds two objects, as it doesn't filter by task. Add the task into the filter for the Target so that only one Target object is be returned. Note that a command line like "bitbake recipe:task recipe:task" will still cause an error as bitbake doesn't de-duplicate the command line arguments and will run the recipe:task combination twice. (Bitbake rev: 1c0a689fdaae6469d4afb98583161073d32ea50b) 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: attach kernel artifacts to targetsElliot Smith2016-07-195-32/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bzImage and modules files were previously attached to a build, rather than to the target which produced them. This meant it was not possible to determine which kernel artifact produced by a build came from which target; which in turn made it difficult to associate existing kernel artifact with targets when those targets didn't produce artifacts (e.g. if the same machine + target combination was built again and didn't produce a bzImage or modules file because those files already existed). By associating kernel artifacts with the target (via a new TargetArtifactFile model), we make it possible to find all the artifacts for a given machine + target combination. Then, in cases where a build is completed but its targets don't produce any artifacts, we can find a previous Target object with the same machine + target and copy its artifacts to the targets for a just-completed build. Note that this doesn't cover SDK artifacts yet, which are still retrieved in toaster.bbclass and show up as "Other artifacts", lumped together for the whole build rather than by target. [YOCTO #8556] (Bitbake rev: 9b151416e428c2565a27d89116439f9a8d578e3d) 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: improve image file suffix retrievalElliot Smith2016-07-191-37/+11
| | | | | | | | | | | | | | Refactor retrieval of suffix from image file path, making it a a method on Target_Image_File. This makes it easier to use this in the build dashboard for individual images, plus reduces the complexity of the code required to get all of the image file suffixes for a build. (Bitbake rev: 9c38de3dec74c122c2060cad37331bdafc6858ec) 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-192-26/+181
| | | | | | | | | | | | | | | | 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: toaster: display Target targets in build dashboardElliot Smith2016-07-192-4/+23
| | | | | | | | | | | | | | | | | | The build dashboard was showing the targets for the build in the page heading and title as "Target object". Add a filter which extracts the "target" from each Target object as a string so that the heading and title display correctly. Also sort the image file suffixes alphabetically. [YOCTO #8556] (Bitbake rev: 33a24992139e7dc05d14bbe1da60299b732945aa) 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: runqueue: improve exception loggingEd Bartosh2016-07-191-2/+2
| | | | | | | | | | | | | | | Runqueue errors direct the user to view the "failure below", but no additional error message is available. Log the stacktrace so that the user can see what went wrong. Also fix a typo in the log message. (Bitbake rev: e191f401e372ee181bc02250232ad9cb9a0e9477) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils.py: return sorted OrderedDict in explode_dep_versions2Robert Yang2016-07-191-0/+1
| | | | | | | | | | | | | | | | | The OrderedDict's item is sorted by insertion order, there might be a problem when build the same recipe again, for example: - First build of acl: Depends: libattr1 (>= 2.4.47), libc6 (>= 2.24) - Second build of acl: Depends: libc6 (>= 2.24), libattr1 (>= 2.4.47) They are exactly the same depends, but tools like "diff" doesn't think so. Return sorted OrderedDict will fix the problem. (Bitbake rev: a392f19f16ef8202ce3c12afbeb186a02438da17) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: avoid errors when fetching outside of a taskPaul Eggleton2016-07-191-3/+4
| | | | | | | | | | | | In a few places we use the fetcher code to fetch files outside of a task, for example uninative in OE. In that case the pid of the event is 0 and that was causing an error in BBUIHelper.eventHandler(). Check the pid and do nothing if it's 0. (Bitbake rev: 59cb919e5cd5c653fb4d69b2d6a4320648443e10) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: build: don't use $B as the default cwd for functionsRoss Burton2016-07-191-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | When bitbake executes a shell or Python function it can cd/chdir() into a directory before executing the task. If no directory is specified then the default of $B is used. However $B is an OpenEmbedded variable and BitBake shouldn't be aware of it. To solve this change the semantics slightly so that if no directory is specified, the current working directory isn't changed. There's also a sanity check that emits a warning if a Python task does os.chdir() without restoring the old path, and the previous working directory is restored. This does change semantics: whereas before a function in OE would have $B as the working directory unless specified, now the working directory is the top of the build tree. Any breakage this causes can be solved by either adding do_some_task[dirs] = "${B}" or by using absolute paths in the task. [ YOCTO #4634 ] (Bitbake rev: 67a7b8b021badc17d8fdf447c250e79d291e75f7) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/build.py: decode the command as UTF-8Ross Burton2016-07-191-2/+6
| | | | | | | | | | | | | | | The messaging FIFO is UTF-8, so decode the command as UTF-8 as well as the value as otherwise "bberror" != b("bberror") and none of the messages from shell functions are ever displayed. Also add an else to the command parser so unhandled commands are noticed. [ YOCTO #9947 ] (Bitbake rev: 42d727743fa599e0a3c5ad2c29a1e6ede1a918bb) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils: fix set_process_nameRoss Burton2016-07-191-3/+2
| | | | | | | | | | | | With Python 3 create_string_buffer needs a bytes() not a str() but as we were catching all exceptions nobody noticed. [ YOCTO #9910 ] (Bitbake rev: 6576a9a95486c28a01d4211b4a33cc3e2c55a7cc) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: tests Add selenium test for layerdetails pageMichael Wood2016-07-081-0/+190
| | | | | | | | | | | | | This tests: - Adding remove layer from project - Deleting layer - Editing layer fields (Bitbake rev: cabe7e2459fcd561bced2d39ba5bd173576153e5) 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: toaster: add Layer delete front end feature to layerdetailsMichael Wood2016-07-084-2/+58
| | | | | | | | | | | | Add the front end feature to delete a layer from the layer details page. [YOCO #9184] (Bitbake rev: 91815229f60eb9deba7d299f05c69b52ff1df59c) 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: toaster: api Add util function for returning the error responseMichael Wood2016-07-081-12/+16
| | | | | | | | | | Also clean up flake8 warnings in XhrBuildRequest (Bitbake rev: aa0845242eda8650a97180bf6675551c26554cde) 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: toaster: layerdetails api Fix saving of git revision of a layerMichael Wood2016-07-084-46/+103
| | | | | | | | | | | | | | Update, clean up and move the api for updating a layerversion from the views to api. Also update the layerdetails page to include the layerversion id in the url getter. [YOCTO #8952] (Bitbake rev: 20f4e23bc86290f0a42881a7cac44c41eafa86fc) 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: buildinfohelper: ensure task datetimes are timezone-awareElliot Smith2016-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | When using toaster-eventreplay to run a bitbake event file through toasterui/buildinfohelper, errors occur when the tasks are updated with buildstats info: RuntimeWarning: DateTimeField Task.started received a naive datetime (2016-07-06 09:15:22.070000) while time zone support is active. This is because a method in buildinfohelper returns a naive datetime, but Django is expecting timezone-aware datetimes. Ensure that datetimes used to set the started/ended times on tasks are converted to timezone-aware datetimes. (Bitbake rev: df9f4337bec87024ea6a43138c6080a755eb7fab) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: eventreplay: rewrite the scriptEd Bartosh2016-07-081-125/+82
| | | | | | | | | | | | | Rewritten toaster-eventreplay to make code working as expected, more compact and readable. [YOCTO #9585] (Bitbake rev: 45370a860b24a761d1b6e08ba752079cc45f54da) 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: eventreplay: reorganize importsEd Bartosh2016-07-081-11/+6
| | | | | | | | | | | | | | Cleaned up module imports: - Removed unused imports - Removed import of print_function - Removed duplicated imports - Splitted importing bb.lib to 2 lines (Bitbake rev: 332f5c9b20149e9f5757433df9458ce582ff32dd) 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: eventreplay: replace MockConfigParameters with namedtupleEd Bartosh2016-07-081-12/+2
| | | | | | | | | | | | | | class MockConfigParameters has only one attribute and only __init__ method. Replacing it with namedtuple makes code less nested and more readable. [YOCTO #9585] (Bitbake rev: 5d4df14b0d38f6c89ca16de6dada58b4bb015d71) 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>