summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: fetch2: clean up remaining cwd saves/changesMatt Madison2016-08-251-11/+0
| | | | | | | | | | | Now that the fetchers all preserve the current working directory, the cwd changes in the try_mirror_url, download, and checkstatus methods are no longer needed. (Bitbake rev: 0ed8975c42718342a104a9764a58816f964ec4ea) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: Fix file variable typo in compare_sigfilesJonathan Liu2016-08-201-1/+1
| | | | | | | (Bitbake rev: deab9a30987b225922490ca186c5307c15d45b82) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: preserve current working directoryMatt Madison2016-08-2013-137/+101
| | | | | | | | | | | Fix the methods in all fetchers so they don't change the current working directory of the calling process, which could lead to "changed cwd" warnings from bitbake. (Bitbake rev: 6aa78bf3bd1f75728209e2d01faef31cb8887333) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui, knotty: don't print taskid followed by taskstring which ↵Martin Jansa2016-08-202-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | are now in most cases identical * unify the format how the task is described * don't show taskid followed by taskstring as the taskstring is different only for setscene tasks (by _setscene suffix) * the duplicated output was introduced by: 2c88afb taskdata/runqueue: Rewrite without use of ID indirection as reported and confirmed as a bug here: http://lists.openembedded.org/pipermail/openembedded-core/2016-June/123148.html * show: NOTE: Running task 541 of 548 (/OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_package) instead of much longer: NOTE: Running task 541 of 548 (ID: /OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_package, /OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_package) and similarly for failed tasks: ERROR: Task (virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_install) failed with exit code '1' instead of much longer: ERROR: Task virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_install (virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_install) failed with exit code '1' (Bitbake rev: 696693d45f5eff1226866ed79dbfb67161d8cd3f) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests: add unit tests for the usehead url parameterMarkus Lehtonen2016-08-201-0/+30
| | | | | | | | | [YOCTO #9351] (Bitbake rev: 63031c0236ace10a9d52b9db9bbb892c1b4bf7db) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: git: Allow local repos to use HEADRichard Purdie2016-08-201-1/+15
| | | | | | | | | | | | | | | | Introduce a new 'usehead' url parameter for git repositories. Specifying usehead=1 causes bitbake to use whatever commit the repository HEAD is pointing to. Usage of usehead=1 is only allowed for local git repositories, i.e. it must always be accompanied with protocol=file url parameter. [YOCTO #9351] (Bitbake rev: 2673fac5a9d06de937101e3fb2ddf1e60ff99abf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-selftest: introduce BB_TMPDIR_NOCLEANMarkus Lehtonen2016-08-201-1/+4
| | | | | | | | | | Set this env variable to 'yes' to preserve temporary directories used by the fetcher tests. Useful for debugging tests. (Bitbake rev: 04132b261df9def3a0cff14c93c29b26ff906e8b) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Update version to 1.31.1Richard Purdie2016-08-181-1/+1
| | | | | | (Bitbake rev: 3ff1c66e6f336e5de7dcbc983a97fcd19ddc6b81) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Initial multi-config supportRichard Purdie2016-08-188-386/+527
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the notion of supporting multiple configurations within a single build. To enable it, set a line in local.conf like: BBMULTICONFIG = "configA configB configC" This would tell bitbake that before it parses the base configuration, it should load conf/configA.conf and so on for each different configuration. These would contain lines like: MACHINE = "A" or other variables which can be set which can be built in the same build directory (or change TMPDIR not to conflict). One downside I've already discovered is that if we want to inherit this file right at the start of parsing, the only place you can put the configurations is in "cwd", since BBPATH isn't constructed until the layers are parsed and therefore using it as a preconf file isn't possible unless its located there. Execution of these targets takes the form "bitbake multiconfig:configA:core-image-minimal core-image-sato" so similar to our virtclass approach for native/nativesdk/multilib using BBCLASSEXTEND. Implementation wise, the implication is that instead of tasks being uniquely referenced with "recipename/fn:task" it now needs to be "configuration:recipename:task". We already started using "virtual" filenames for recipes when we implemented BBCLASSEXTEND and this patch adds a new prefix to these, "multiconfig:<configname>:" and hence avoid changes to a large part of the codebase thanks to this. databuilder has an internal array of data stores and uses the right one depending on the supplied virtual filename. That trick allows us to use the existing parsing code including the multithreading mostly unchanged as well as most of the cache code. For recipecache, we end up with a dict of these accessed by multiconfig (mc). taskdata and runqueue can only cope with one recipecache so for taskdata, we pass in each recipecache and have it compute the result and end up with an array of taskdatas. We can only have one runqueue so there extensive changes there. This initial implementation has some drawbacks: a) There are no inter-multi-configuration dependencies as yet b) There are no sstate optimisations. This means if the build uses the same object twice in say two different TMPDIRs, it will either load from an existing sstate cache at the start or build it twice. We can then in due course look at ways in which it would only build it once and then reuse it. This will likely need significant changes to the way sstate currently works to make that possible. (Bitbake rev: 5287991691578825c847bac2368e9b51c0ede3f0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: siggen: properly close files rather than opening them inlinePaul Eggleton2016-08-181-6/+9
| | | | | | | | | | If you don't do this, with Python 3 you get a warning on exit under some circumstances. (Bitbake rev: 49502685df3e616023df352823156381b1f79cd3) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ast/ConfHandler: Add a syntax to clear variableJérémy Rosen2016-08-183-0/+62
| | | | | | | | | | | | unset VAR will clear variable VAR unset VAR[flag] will clear flag "flag" from var VAR (Bitbake rev: bedbd46ece8d1285b5cd2ea07dc64b4875b479aa) Signed-off-by: Jérémy Rosen <jeremy.rosen@openwide.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache: Build datastores from databuilder objectRichard Purdie2016-08-182-31/+38
| | | | | | | | | | | | | | Rather than passing in a datastore to build on top of, use the data builder object in the cache and base the parsed recipe from this. This turns things into proper objects building from one another rather than messy mixes of static and class functions. This sets things up so we can support parsing and building multiple configurations. (Bitbake rev: fef18b445c0cb6b266cd939b9c78d7cbce38663f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache: Split Cache() into a NoCache() parent objectRichard Purdie2016-08-181-52/+57
| | | | | | | | | | | There are some cases we want to parse recipes without any cache setup or involvement. Split out the standalone functions into a NoCache variant which the Cache is based upon, setting the scene for further cleanup and restructuring. (Bitbake rev: 120b64ea6a0c0ecae7af0fd15d989934fa4f1c36) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache/cooker: Pass databuilder into bb.cache.Cache()Richard Purdie2016-08-182-3/+5
| | | | | | | | | | | | | Rather that the current mix of static and class methods, refactor so that the cache has the databuilder object internally. This becomes useful for the following patches for multi config support. It effectively completes some of the object oriented work we've been working towards in the bitbake core for a while. (Bitbake rev: 7da062956bf40c1b9ac1aaee222a13f40bba9b19) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache: Make virtualfn2realfn/realfn2virtual standalone functionsRichard Purdie2016-08-183-40/+35
| | | | | | | | | Needing to access these static methods through a class doesn't make sense. Move these to become module level standalone functions. (Bitbake rev: 6d06e93c6a2204af6d2cf747a4610bd0eeb9f202) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache/ast: Move __VARIANTS handling to parse cache functionRichard Purdie2016-08-182-5/+5
| | | | | | | | Simple refactoring to allow for multiconfig support. (Bitbake rev: 266b848da40904446eb1d084bbdc5307a9b45197) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Abstract worker functionality to an object/arrayRichard Purdie2016-08-181-56/+66
| | | | | | | | | | | | | | | With the introduction of multi-config and the possibility of distributed builds we need arrays of workers rather than the existing two. This refactors the code to have a dict() of workers and a dict of fakeworkers, represented by objects. The code can iterate over these. This is separated out from the multi-config changes since its separable and clearer this way. (Bitbake rev: 8181d96e0a4df0aa47287669681116fa65bcae16) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cookerdata: Simplify prefiles/postfilesRichard Purdie2016-08-181-3/+5
| | | | | | | | | The current codepaths are rather confusing. Stop passing these as parameters and use the ones from when the object is created. (Bitbake rev: 8c992c148d9619b10eeae8bbd9376ecf408037a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/utils.py: export_proxies add GIT_PROXY_COMMANDFrancisco Pedraza2016-08-171-1/+2
| | | | | | | | | | | This was added to enable the usage of git through proxies. (Bitbake rev: 449fc52e483a3bf1cec1c5d8cf8c3946ec5292ab) Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: don't show number of running tasks in quiet modePaul Eggleton2016-08-171-1/+3
| | | | | | | | | | | There's not a whole lot of point showing how many tasks are running when we're in quiet mode, it just looks a bit strange particularly when it's not running any tasks. (Bitbake rev: 5317200d9cd73c6f971bc1b0cfe8692749e27e3a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: fix task progress bar not starting at 0%Paul Eggleton2016-08-171-2/+5
| | | | | | | | | | If we have the task number here we need to subtract 1 to get the number of tasks completed. (Bitbake rev: 7c78a1cd3f0638ae76f7c7a469b7f667c7c58090) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: fix two minor issues with the initialising tasks progressPaul Eggleton2016-08-171-2/+3
| | | | | | | | | | | | | | A couple of fixes for the "Initialising tasks" progress bar behaviour: * Properly finish the progress bar when using bitbake -S * Finish the progress bar before calling BB_HASHCHECK_FUNCTION (so that in OE when that shows its own "Checking sstate mirror object availability" progress bar it gets shown on the next line as it should). (Bitbake rev: de6759d8e9990e426e6d6464a2e05381cd4c12d6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/tests/fetch: remove URL that doesn't exist anymoreRoss Burton2016-08-171-1/+0
| | | | | | | | | | The CUPS ipptool URL we were checking now redirects to github where the tarball isn't present, so remove it from the test suite. (Bitbake rev: 4b50895fb3462b21e3874a2e99c363c8d05e89e6) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update web urls for openembedded-core's special caseDavid Reyna2016-08-171-0/+6
| | | | | | | | | | | | | | The layer index update command has a special case for the updating 'openembedded-core' layer, and it was missing reading and updating the git web URL fields. [YOCTO #8037] (Bitbake rev: ce2f990a366d2d939e93e01f67688f12740c5fee) Signed-off-by: David Reyna <david.reyna@windriver.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: buildinfohelper Add handling local layers (i.e. non-git) ↵Michael Wood2016-08-111-4/+23
| | | | | | | | | | | | layers Adds handling of the non-git layers to create and update the corresponding layer objects in Toaster. (Bitbake rev: 0a9b5d7d9655dbb09d458fc6e330e932f0f9dab6) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: bldcontrol model BRLayer Add corresponding local_source_dirMichael Wood2016-08-113-1/+29
| | | | | | | | | | | | Sync the BRLayer object with the new field added to the Layer object. The BRLayer (BuildRequest Layers) are snapshots of the layers in the project at build time and therefore need to mirror the required fields of the layer object. (Bitbake rev: a3112c922f036425977abffa0137b9133f61fcd6) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: adapt xhr_import_layer test locally imported layerSujith H2016-08-111-0/+1
| | | | | | | | | | | | Update xhr_import_layer test to use locally imported layer in local_source_dir. [YOCO #9911] (Bitbake rev: f855490dd04281beb5ae65d82430203d9fd263fc) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update build configuration pageSujith H2016-08-111-0/+14
| | | | | | | | | | | | | | Update layer branch and layer commit section in the build configuration page for locally imported layers. For locally imported layers this secion goes as "Not applicable". [YOCO #9911] (Bitbake rev: 4ca3f602a955e01d445fb4789496e925f8d4234b) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update recipe details pageSujith H2016-08-111-2/+18
| | | | | | | | | | | | | | Update Layer branch and Layer commit in recipe details page. For local layer imported from toaster these fields are not applicable. [YOCO #9911] (Bitbake rev: 35f7faabff17ca577fdd2e84bb25125047f66345) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update package detail pageSujith H2016-08-111-2/+16
| | | | | | | | | | | | | | | Update package details pages layer branch and layer commit section for locally imported layers. We add Not applicable to them along with a helper text, which helps user understand why its not applicable to those layers. [YOCO #9911] (Bitbake rev: 6978f65af4eabe91f65a6766799578c84a0988aa) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: updte build tables for locally imported layersSujith H2016-08-111-0/+32
| | | | | | | | | | | | | | Update the build tables section for locally imported layers. Here we do not provide informations such as branch or commit. Because those are locally imported layer(s). [YOCO #9911] (Bitbake rev: 1b0934b45d3704de604405826de9fc1da51ceae1) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update the tables informationSujith H2016-08-111-3/+27
| | | | | | | | | | | | | | | Update table informations for pages: 1) Compatible layers 2) Compatible image recipes Added Not Applicable to the fields of locally imported layers because they are not git version. [YOCO #9911] (Bitbake rev: 7e73f8583a0f92d73b42410e1c960b6f2976a557) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: collect details for local dir imported from uiSujith H2016-08-111-1/+12
| | | | | | | | | | | | | | | Collect the dir path imported from UI and make sure that its getting added to bblayers.conf. This patch exactly does the same job. Any layer which is imported locally need not be cloned again to _toaster_clones dir. [YOCO #9911] (Bitbake rev: 5669157994fc220a018e37927600988f3fd43271) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add local_source_dir field to modelSujith H2016-08-112-0/+20
| | | | | | | | | | | | | | | Add a new field local_source_dir to model. This will clearly differentiate us from the vcs_url which is for git path. Adding migration file 0010_layer_local_source_dir_path.py along with this patch. [YOCO #9911] (Bitbake rev: 83763d89f9d0bc535e930a2094ba8201675d40be) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add local directory to the dbSujith H2016-08-111-3/+4
| | | | | | | | | | | | | Adding local directory to the database. The local directory is added to vcs_url, field of db. [YOCO #9911] (Bitbake rev: 2c3d48e7cd21a999ef145081352774f1759cd5e4) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: improve the display when local dir is addedSujith H2016-08-111-1/+6
| | | | | | | | | | | | | | The helper text gets displayed accordingly when mouse is hovered above the layers. If its a local directory then no more branch is mentioned. Only directory path is mentioned. [YOCTO #9911] (Bitbake rev: c1961c7844cab5b9c9144f3b4946197097f53e17) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update css file for layer importBelen Barros Pena2016-08-111-1/+6
| | | | | | | | | | | | | Update the css file for the layer import. This changes will improve the UI for the task. [YOCO #9911] (Bitbake rev: a41d0400478186c983334d8f83780639e7361c91) Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add local_source_dir to the needed_fieldsSujith H2016-08-111-0/+1
| | | | | | | | | | | | | | This change will help us know if local_source_dir is null or if there is value associated with this field. This change will help us display the details for duplicate layers tryied to import locally. [YOCOT #9911] (Bitbake rev: 4350b01f776e6e35745c3eb9440587973de00eec) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: control the selection of git and local repoSujith H2016-08-111-11/+114
| | | | | | | | | | | | | | Changes made in this patch will help user to select either repo based on git and local. This patch also improves the help provided to user so that user can understand them and take necessary action to proceed. [YOCOT #9911] (Bitbake rev: 26bee4c2c05dc202857270cd5f56abff79674ca7) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add import of local directory to UISujith H2016-08-111-78/+106
| | | | | | | | | | | | | | | | This patch will help to add local directory to UI. The modification is made in importlayer.html file. The radio buttons are created to separate selection of git based repo and local directory. Co-Author: Belen Barros Pena <belen.barros.pena@linux.intel.com> [YOCOT #9911] (Bitbake rev: 78e5edb8ed4bf6c8b0fb87fcf17a82485c145920) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix unhandled exceptionEd Bartosh2016-08-111-2/+2
| | | | | | | | | | | | | | manage.py lsupdates throws DataError exception if the recipe can't be saved to the MySQL database: django.db.utils.DataError: (1406, "Data too long for column 'license' at row 1" Adding DataError exception to the list of exceptions should make lsupdates to print a warning message and skip the recipe. (Bitbake rev: 01891c13ae8dcba64e5cf79956f1b64c2afdaae3) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: ensure that the Build object is always availableElliot Smith2016-08-112-83/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | Many of the methods in toasterui and buildinfohelper rely on the internal state of the buildinfohelper; in particular, they need a Build object to have been created on the buildinfohelper. If the creation of this Build object is tied to an event which may or may not occur, there's no guarantee that it will exist. This then causes assertion errors in those methods. To prevent this from happening, add an _ensure_build() method to buildinfohelper. This ensures that a minimal Build object is always available whenever it is needed, either by retrieving it from the BuildRequest or creating it; it also ensures that the Build object is up to date with whatever data is available on the bitbake server (DISTRO, MACHINE etc.). This method is then called by any other method which relies on a Build object being in the internal state, ensuring that the object is either available, or creating it. (Bitbake rev: 0990b4c73f194ec0be1762e4e48b1a525d8349fb) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster-tests: add test for showing self-dependent taskElliot Smith2016-08-111-0/+76
| | | | | | | | | | | | | | Toaster occasionally records a task which depends on itself. Add a test which checks that a task which depends on itself can be displayed in the task page. [YOCTO #9952] (Bitbake rev: b7a699e701785b5bd8da97b6e1b760a1c6dd05f5) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: prevent infinite loop when finding task dependenciesElliot Smith2016-08-111-0/+10
| | | | | | | | | | | | | | | | | | | Toaster occasionally records a task which depends on itself. This causes a problem when trying to display that task if it is "covered" by itself, as the code does the following: for task A, find a task B which covers A; then, recursively find the task which covers B etc. If B == A, this loop becomes infinite and never terminates. To prevent this, add the condition that, when finding a task B which covers A, don't allow B == A. [YOCTO #9952] (Bitbake rev: 88c471c7e5995abb5bca62990b91650277b6c926) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster-tests: add tests for reverting to default sortElliot Smith2016-08-111-0/+160
| | | | | | | | | | | | | | | Add tests for ToasterTable UI table sort reverting, which can only be exercised via the browser. Check that if a table is sorted by a column, and that column is hidden, then the sort reverts to the default for the table. [YOCTO #9836] (Bitbake rev: 5b016338478d784fd048ba2baae121c3e558090c) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: reset table to default orderby when orderby column is hiddenElliot Smith2016-08-111-18/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | When a ToasterTable is sorted by a column, and that column is hidden from view, the sort doesn't revert to the default for the table. Modify the JS responsible for reloading the table data so that it doesn't rely on clicking a table column heading (as this is inflexible and error-prone). Instead, use a function to apply the sort to the table; and call that function when column headings are clicked. This means that the ordering can be changed programmatically to a specified default ordering when a column is hidden, without having to click on a column heading. Use this function when the current sort column is hidden, to apply the default sort for the table. [YOCTO #9836] (Bitbake rev: a28377067b6f381bbc98db82f5c45fca6620f7ad) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: show loading spinner after creating custom imageElliot Smith2016-08-114-6/+66
| | | | | | | | | | | | | | | | | | | | Creating a custom image through the "New custom image" dialog can sometimes result in a long pause between pressing the button to create the image, and being transferred to the page showing details of its content. This can make it appear as though pressing the button had no effect. To prevent this from happening, disable the button and text box in the new custom image dialog after the "Create image" button is pressed. Also show a loading spinner and "loading..." text on the button to make it clear that the application is still responding. [YOCTO #9475] (Bitbake rev: dd8bede91e08c0b64b949ca98c74e6144da88fd1) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster-tests: fix erroneous message when test failsElliot Smith2016-08-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | When one of the layer details tests fails (as it occasionally does, if running on a machine under heavy load, due to sync issues), the error message shown is misleading, as it is something like: "Expected 'This was imported' in ['This was imported', ...]" The string 'This was imported' is in the list shown in the message, but the message suggests it isn't. This is because the test compares the string with one list, but then uses a different list in the fail message if the comparison fails. Fix the list shown in the message about the test failing. (Bitbake rev: 34943b2278efe99c6744399e04a47cdda630468e) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster-tests: add tests for most recent builds state changesElliot Smith2016-08-111-0/+211
| | | | | | | | | | | | Add tests for the state transitions in the "most recent builds" area of the all builds page. [YOCTO #9631] (Bitbake rev: b95681cf38475903ad4f73059313dda8c0dccef6) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster-tests: add tests for build dashboard menu and summary ↵Elliot Smith2016-08-112-26/+108
| | | | | | | | | | | | | | | visibility Test that the build dashboard only shows a menu and a build summary area if a build has properly "started" (i.e. has at least one Variable object associated with it). [YOCTO #8443] (Bitbake rev: 9e16f76fb254ae967ded6c21251243b2af9b16b6) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>