summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
Commit message (Collapse)AuthorAgeFilesLines
...
* bitbake: toaster: Simplify redirects when build page parameters are missingElliot Smith2015-09-181-17/+32
| | | | | | | | | | | | | | | | | | | | | A RedirectException is used to redirect the client to the correct page when their original request is missing the required parameters (page, orderby etc.). However, the code is difficult to follow. Rather than catching RedirectExceptions and rethrowing them with different view URLs, ensure that the RedirectException has the correct URL in it when thrown by passing the original page name to the _build_list_helper() method. Modified from an original patch by David Reyna <david.reyna@windriver.com>. (Bitbake rev: 38f935647dd768a912b933adebfc9cb225a01a54) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix date range pickers on the project builds pageElliot Smith2015-09-181-2/+2
| | | | | | | | | | | | | | | | | | | These were referring to the old HTML elements with ids "date_from_created" and "date_from_updated", but their ids have changed to "date_from_started_on" and "date_from_completed_on". This meant that they weren't functional. This fixes the references. Modified from an original patch by David Reyna <david.reyna@windriver.com>. (Bitbake rev: fe9a554249b623ef515502043fdbf50e1ac62a3a) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Show correct builds count on project pagesElliot Smith2015-09-182-3/+3
| | | | | | | | | | | | | | | | | The counter for completed builds on the project pages includes builds in progress. Instead use the completedbuilds queryset to count the number of completed builds for display on project pages. Modify how the completedbuilds queryset is constructed so it only excludes builds with status "in progress". (Bitbake rev: 455a0087e0dcd74998abd02a110942f25da127be) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: hide irrelevant builds in the project builds viewAlexandru DAMIAN2015-09-181-12/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the project builds view so it doesn't show "in progress" builds or builds for other projects. Note that this also modifies the "all builds" view to use the same queryset filtering as the project builds. This is to avoid excluding "in progress" builds more than once, which is what was happening before. The patch also has a minor change to ensure that when displaying the project builds page, only builds for that project are in the results. The queryset filtering is now split over several lines so you can see what's going on. [YOCTO #8236] [YOCTO #8187] (Bitbake rev: 09079f15c0511a6d17ce1cc29be6de5387e45f09) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Don't def a function for each call to build_artifact()Elliot Smith2015-09-181-32/+10
| | | | | | | | | | | | | | | | Cache the mimetype object and only define the function for getting a mimetype once. Also ensure that filemagic is listed as a requirement of toaster. Doing this also means we can remove the code which tries multiple different "magic" libraries, as we know we have the right version available. (Bitbake rev: 8d3aa2d46ebab7a59e57234f0b3f6fc3225a13e8) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Avoid unnecessary local to local copy of cooker logElliot Smith2015-09-183-51/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cooker log is copied from its original (bitbake) location to an artifact directory chosen by the user (chosen when checksettings.py runs as part of the managed mode; it's one of the annoying questions you're asked at startup). The copy happens as part of the runbuilds script run, which is started in a loop from the toaster startup script in managed mode. When a user requests the log for a build via toaster, they are getting the log which has been copied to the artifact directory, not the original bitbake log. This works for the managed case, where the runbuilds command is running in a loop and copying log files for completed builds to the artifact directory. However, in analysis mode, there are two problems: 1. checksettings isn't run, so the artifacts directory isn't set. toaster is then unable to figure out where the log files should have been copied to. 2. The log files aren't copied to the artifacts directory anyway, as runbuilds isn't running in analysis mode. To fix this, just point the user to the local bitbake log file in its original location. This avoids the copy step, and means we can remove a whole question from the toaster startup sequence, as we no longer need an artifact directory. The only downside to this is that it's not appropriate for remote bitbake servers. We will need to revisit this and possibly reinstate the copy step once we have to reconcile local and remote builds and make their logs available in the same way. [YOCTO #8209] (Bitbake rev: 5697bbcc88edad85891f66d28b8803a9c9d27ff2) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: delete multiple builds cleanupbrian avery2015-09-181-4/+9
| | | | | | | | | | | | | | | | This patch cleans up the multiple delete. It: 1) skips build id's that don't exist rather than giving a traceback. 2) let you pass in the ids as a space separated list 3) fixes the usage to match the space separated list format [YOCTO #7726] (Bitbake rev: a065f7e5e9c07dbd71a98e7db1d7f711607716f3) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: increase waiting timeEd Bartosh2015-09-121-2/+2
| | | | | | | | | | | | | Increased waiting time for toasterUI from 10 to 25 seconds. Bitbake takes longer time to start, so toaster should wait longer. [YOCTO #8240] (Bitbake rev: 224ee3685fe20915b21d299ab80f7b289a916dca) 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: Changes to navigationBelen Barros Pena2015-09-095-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | This patch: * Changes the breadcrumb to provide access to either the project builds or the project configuration, as appropriate * Changes the left navigation in the project configuration to reflect the hierarchical relationship between the basic configuration and all other configuration pages * Changes the left navigation in the build history to bring it in line with the changes in the project configuration This way the breadcrumb explicitly exposes the hierarchy of the application, which is its correct behaviour, making it easier to move around within Toaster. (Bitbake rev: 135dff67216759286f584e501583584a9cb09f27) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: replace ETA with % of tasks doneBelen Barros Pena2015-09-081-1/+1
| | | | | | | | | | | | | The ETA we show for builds in progress is woefully inaccurate. In the 1.8 release we replaced it with the % of tasks completed. Somehow, we regressed to the ETA, so bringing the task % back. (Bitbake rev: a841dc85770ea5c6fa8cf06ba5fdfe214e69afb2) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix project names in latest buildsBelen Barros Pena2015-09-081-1/+5
| | | | | | | | | | | | | | | | Make sure that the project name we show for each build in the latest builds section of the all builds page: * Has the same styles as the build, depending on the build status (in progress, failed or success) * Links to the project page (Bitbake rev: 09abcf3199b2e86758a974a47ebe31f5fb79440a) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: remove unnecessary white spaceBelen Barros Pena2015-09-081-1/+1
| | | | | | | | | | | | There was too much white space above the first heading in the all builds page. This patch removes the class that was adding the extra space. (Bitbake rev: c9b20009c5e161987a143b00ee22218a4c9c0692) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: Add missing files from ↵Richard Purdie2015-09-082-0/+214
| | | | | | | | 1c2f6b9b7b9e700146944b9d6d2114e0d014ee81 (Bitbake rev: cf2b6b621cb483aa1a1a66c09fc431efc207c91e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: improve explanation of checkout dirBelen Barros Pena2015-09-041-16/+16
| | | | | | | | | | | | | | | | Improve the explanation we show to users during set up when asking them to set the layers checkout directory. The patch also makes minor changes in text formatting to improve legibility. [YOCTO #7740] (Bitbake rev: dd9284944ae0f0feecb70adab880fed636f7cd59) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Add tests for pages which show the default projectElliot Smith2015-09-031-1/+114
| | | | | | | | | | | | | | | | Test that the correct landing page redirect is applied, depending on the state of the default project. Test that the default project is only shown on the /projects page if it has at least one build. [YOCTO #7932] (Bitbake rev: 85a65d2b652c2ccc6cfb90fd8bc9048d0e72341e) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix test for projects page JSONElliot Smith2015-09-031-4/+5
| | | | | | | | | | | | | | | | The tests expect data to be returned in a particular format, which doesn't include is_default or the num_builds fields added to support default project improvements. Add the extra fields so the tests pass again. [YOCTO #7932] (Bitbake rev: 66f965b68dda76a755d88879191a0f340ba19142) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Exclude default project unless it has buildsElliot Smith2015-09-031-0/+8
| | | | | | | | | | | | | Don't include the default "command line builds" project in the projects view unless it has builds associated with it. [YOCTO #7932] (Bitbake rev: b37318057ccbfb3889d28fd593cc1602febf1ae9) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Only redirect to projects page if user has added projectsElliot Smith2015-09-031-1/+5
| | | | | | | | | | | | | | | | | | The landing page currently redirects the user if there are any projects in the db. Because we now always have at least one (the default one added by a migration), we always get the redirect. Change this so that when the user hits the landing page, we only redirect them to the projects page if there is at least one user-added project and there are no builds. [YOCTO #7932] (Bitbake rev: 316a70da93055b63eff7d40b7fd8bd07299074af) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Improve how default project is identified and fetchedElliot Smith2015-09-033-5/+733
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Command line builds are associated with a "default project" (as we currently require a build to have a project). This acts as a container for builds initiated outside Toaster. Currently, this project is marked as the default by its ID being 0. However, this doesn't work with MySQL, as MySQL won't allow 0 in a foreign key which references an autoincrement field. Instead, use an is_default field to track the default Project for builds initiated outside Toaster. Add a method to fetch this default project, rather than fetching a project with a magic ID. Add this default project in a migration, rather than as a side effect of a get_or_create() style method. Also ensure that builds always have a project explicitly assigned to avoid any magic with a build's project foreign key defaulting to 0 (as it no longer does). [YOCTO #7932] (Bitbake rev: 71b709a1bbc26d89d61873763b467d21e625b274) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Make 0021 migration compatible with MySQLElliot Smith2015-09-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Two issues prevent this migration from working correctly with a MySQL back-end: 1. MySQL won't allow a default value to be set for an AutoField, which is what the migration tries to do for project_id ("ValueError: The database backend does not accept 0 as a value for AutoField.") 2. When migrations are applied to a MySQL back-end, Django (via South) attempts a dry run of the migration first: it applies the forward migration then rolls it back. However, this migration raises an exception on roll back, which causes the whole series of migrations to fail. This commit fixes both issues. [YOCTO #7932] (Bitbake rev: 12f6278d56d7dec57308adc17411802f15d395d7) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: show incomplete configuration warningBelen Barros Pena2015-09-032-3/+6
| | | | | | | | | | | | In the new build button form, make sure we show a warning when you select a project with an incomplete configuration that cannot be built. (Bitbake rev: 9e970bd7a3e8a7d6ec26265b2e5863624db8a77f) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: disable build button as neededBelen Barros Pena2015-09-031-2/+0
| | | | | | | | | | | | Make sure that the 'build' button in the 'new build' form is disabled whenever the 'recipe(s)' text field is empty. (Bitbake rev: 4daaaf63a26b7dd1c1f035d43c45abffe7b62d76) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: new Toaster imageBelen Barros Pena2015-09-011-0/+0
| | | | | | | | | | | | | | Add a new black and white image of Toaster for use in the landing page, so that nobody can confuse it with the real interface. [YOCTO #7743] (Bitbake rev: 6db00cace690f39ace3a0556db7b5d4e2911d5d7) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: remove old screenshotsBelen Barros Pena2015-09-012-0/+0
| | | | | | | | | | | Remove the Toaster screenshots we no longer use in the landing page. (Bitbake rev: 531fbbf8c0a826ece5c2ed86babc7b866c925686) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: Add frontend javascript unit testsMichael Wood2015-08-292-0/+19
| | | | | | | | | | | Use Jquery's Qunit tests to create some unit tests for javascript components used in toaster. (Bitbake rev: 1c2f6b9b7b9e700146944b9d6d2114e0d014ee81) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix global navigationBelen Barros Pena2015-08-291-2/+4
| | | | | | | | | | | | | | The "All builds" item in the global navigation should only be active when you are in the "all builds" page. The global navigation should not appear at all in the landing page and in the new project page. (Bitbake rev: 120816b133b9c160c68c911a9f4c612ce2f8a9ed) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: adjust spacing in project pagesBelen Barros Pena2015-08-293-24/+12
| | | | | | | | | | | | | | | Mainly in the top of the page, by adjusting some classes and the headings. Also, it removes the commented out tab for the 'My image recipes' section, since the final designs for image customisation do not need it. (Bitbake rev: 945746f21916eb64a0b4344bcf7e7e0dd75b9547) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix show / hide columns in all builds tableBelen Barros Pena2015-08-291-2/+2
| | | | | | | | | | | | | | | | The classes errors_no and warnings_no were removed from the td tags in the builds.html template. That broke the show / hide columns functionality, which would hide only the table heading, but not the data cells. This patch brings back those classes so that you can hide and show the errors and warnings information. (Bitbake rev: da5310f05f8573b2138da98a64749269d0711c18) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Support environments which have proxies setBian Naimeng2015-08-291-29/+7
| | | | | | | | | | | | | | | | | | | | | In an environment with a proxy which requires authentication, e.g. with $http_proxy = 'http://user:password@ip:port', the following error occurs when running Toaster: EE: Using proxy http://user:password@ip:port EE: could not connect to 'url', skipping update: 'error message' This prevents Toaster from fetching layer, recipe and machine information from remote repositories. This patch allows Toaster to use the proxy settings from the environment for HTTP/HTTPS requests. (Bitbake rev: e7a85031fd05a46ef60b380883da4cc372acf89b) Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Remove Log column from All builds pageSujith Haridasan2015-08-291-8/+0
| | | | | | | | | | | | | This patch removes Log from All build table. [YOCTO #8010] (Bitbake rev: 12459211671772905a3e88310b0421b6014f0c20) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix extra checkbox in most recently built recipes sectionSujith Haridasan2015-08-291-1/+0
| | | | | | | | | | | | | | This patch fixes an extra checkbox which is due to an extra space in the target. [YOCTO #8202] (Bitbake rev: 742d15beaf7e2bb8b61ed61b1a26909d16de0eac) Signed-off-by: Sujith Haridasan <sujith.h@gmail.com> Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update directory tree expansionDavid Reyna2015-08-291-2/+1
| | | | | | | | | | | | | | | The ajax query that fetches the directory data on an expand request is now returning the response data already in an object form. so the parseJSON() call is no longer needed (and is currently returning a parse error). [YOCTO #7810] (Bitbake rev: e237d231d52ef71e0f369d1af34f214e6c2359f2) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: change image in landing pageBelen Barros Pena2015-08-291-5/+1
| | | | | | | | | | | | | | | | | Change the Toaster screenshot we use in the landing page to make sure it cannot be confused with the real interface. Also, remove the MANAGE conditional we were using to set the screenshot. We no longer have different applications for the two modes, so it should no longer be needed. [YOCTO #7743] (Bitbake rev: 099c1af869a6cd52a2cdb87465a05893d60c8f38) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: fix projectbuilds pageAlexandru DAMIAN2015-08-192-45/+21
| | | | | | | | | | | | | | | | | | | | This patch fixes the redirection projectbuilds page and the template layout in the projectbuilds page. * The _build_list_helper now returns an empty RedirectException that is properly customized by the caller and re-raised to achieve redirection to the original page (poor man's overloading) * The template for ProjectBuilds is updated as to properly display Build objects instead of BuildRequest objects. [YOCTO #7995] (Bitbake rev: 5982b5df9288a5773c7314234e2e0432f85678f2) 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: toastergui: do not show in-progress builds in the tableAlexandru DAMIAN2015-08-191-1/+1
| | | | | | | | | | | This patch fixes the all-builds table as not to show in-progress builds. (Bitbake rev: 60fdc834d386dbace0a158123afd68df3ffbff90) 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: fix pylint errorsAlexandru Damian2015-08-195-3/+15
| | | | | | | | | | | | | | | | | | | | 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: fix updates on failed build requestsAlexandru DAMIAN2015-08-191-1/+1
| | | | | | | | | | | | | | The patch to fix the original mistake is wrong, in the sense that a constant from the BuildRequest class is used on the build object. Fixing the patch to bring in the correct constant in. (Bitbake rev: a740c17efc0ccc9f89a428ead08f9739af3c6de4) 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: replace raising Exceptions in loadconfAlexandru DAMIAN2015-08-191-14/+23
| | | | | | | | | | | | | | | | | | | This patch replaces throwing Exceptions in toaster loadconf command with proper explicit error messages. This allows the user to properly understand and debug what went wrong when loading a config file. Additionally we change a bit the logic around auto-detecting relative giturl handling so the user gets proper error messages when trying to load an invalid toasterconf.json file. [YOCTO #7945] (Bitbake rev: 3d14cc033a855bf5b20e799438548b6d8f29d9b8) 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: do not stop data import on bad dataAlexandru DAMIAN2015-08-191-4/+4
| | | | | | | | | | | | | | | | | | The layer data update in Layer source needlessly stops processing by throwing an Exception when bad layer data cannot be inserted in the database (e.g. invalid dependencies). This patch changes the behaviour to ignore bad data, and continue with data import after detailed logging through the logging system. [YOCTO #7955] (Bitbake rev: e0911e408db4fa07086738fe11121b173b4d1cf5) 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: toastergui: rename variables in views.pyAlexandru DAMIAN2015-08-191-53/+63
| | | | | | | | | | | | Renaming various variables in the views.py file to make the code more readable, and prevent overshadowing of global variables with local variables that have a different name. (Bitbake rev: 5fe0c42ca9d34fa34b65b9fe0ff474200b78efe6) 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: use loggers instead of printsAlexandru DAMIAN2015-08-192-9/+17
| | | | | | | | | | | | | | | Switching debugging from using print statement to using loggers, as it uses the logging infrastructure to process the messages. The messages are logged with the "toaster" logger which is defined in the toastermain/settings.py. (Bitbake rev: adf3bdcbe8b0b0bbe9de2800f2d20a53e8d88543) 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: models field initializationAlexandru DAMIAN2015-08-191-17/+21
| | | | | | | | | | | | | | As prompted by pylint, the object fields need to be initialized properly, so this patch fixes that. Also adds some casts to int, because, sometimes, the IntegerField is not returning an int, but a string. (Bitbake rev: cc9ac01d0726203fbe916cec51cc464eaeae9305) 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 exception handlingAlexandru DAMIAN2015-08-192-18/+10
| | | | | | | | | | | This patch improves exception handling, fixing issues as prompted by pylint, including exception renaming. (Bitbake rev: 652fad64864703cb1bbeede8d5bfc4208974be68) 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: checksettings: fix TEMPLATECONF detectionAlexandru DAMIAN2015-08-191-1/+7
| | | | | | | | | | | Improving the TEMPLATECONF detection by verifying the return code and dumping extra debug information in case of exception. (Bitbake rev: bdc00755993aa37e7669c3859ef4ea9b1fc3e680) 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: checksettings: fix guesspath initializationAlexandru DAMIAN2015-08-191-1/+3
| | | | | | | | | | | Object fields need to be instantiated in the constructor. Fixed prompted by pylint. (Bitbake rev: 40db75c6117c3226c27d278d2acf0cd3ba61a167) 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: pylint fixesAlexandru DAMIAN2015-08-193-20/+12
| | | | | | | | | | | | This patch fixes imports, default parameters to functions, incorrect overloading and exception handling issues highlighted by pylint. There are no functional changes. (Bitbake rev: 066e096b80dcb0e93e1a088acf5d914184361769) 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: toasteruitest: Updated UI tests cases to use dom IDs and 1.9 UI changesMihail Stanciu2015-08-191-174/+133
| | | | | | | | | | | | | | | Updated existing tests to use dom IDs where necessary. Updated tests to use 1.9 specific UI changes: - removed deprecated columns(log and layer directory) - changed expected names for table header("Recipe" instead of "Target") Added tests for TC 942 and 943 which were missing Removed test for TC 959 which was deprecated under 1.9 (Bitbake rev: d8c37780609571e95edef9a220225927eb94b174) Signed-off-by: Mihail Stanciu <stanciux.mihail@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: Call csrf function in all pages to ensure cookie is sentMichael Wood2015-08-191-0/+1
| | | | | | | | | | | | | | Not all pages call the csrf token template function so django does not bother to send the cookike, this meant that all subsequent ajax calls fail. So add this to the base template. [YOCTO #8175] (Bitbake rev: baed115081f888e027f92f37e12dc2dd2b874bf0) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Fix default function parameter assignment to a listPaul Eggleton2015-08-191-1/+3
| | | | | | | | | | | | | | With python you should not assign a list as the default value of a function parameter - because a list is mutable, the result will be that the first time a value is passed it will actually modify the default. Reference: http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments (Bitbake rev: 7859f7388f2e3f675d0e1527cfde18625f36f637) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: move code from setup_lv_tests to setUpEd Bartosh2015-08-171-30/+27
| | | | | | | | | | | As ProjectLVSelectionTestCase was removed there is no point to keep this function. Moved code back to setUp method. (Bitbake rev: 8e9bd559c8ef0ebc9e8babbada06e710908bae08) 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>