summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: toaster: make runbuilds loopEd Bartosh2016-01-251-3/+10
| | | | | | | | | | | | | | | | | | This avoids having a loop in shell code and initializing heavy Django init machinery every second. Ignore exceptions to prevent exiting the loop. (Bitbake rev: e04da15556ca0936de652b8c085e4199e5551457) (Bitbake rev: 0e9d8d63ddb35d181d4e470585d1e4a4c646cd00) 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> Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: templates Add meaningful title tagsBelen Barros Pena2015-10-2928-19/+55
| | | | | | | | | | | Our title tags are all over the place, and have no relation to the page content. This commit adds a meaningful title tag to each Toaster page. (Bitbake rev: 1ab8827d684a19a70f3b788aed2327bf30edffe2) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Fix restrictive LogMessage message lengthMichael Wood2015-10-272-1/+346
| | | | | | | | | | | | | | Log messages can be quite long so use a TextField rather than a char field with max length of 240. mySQL is especially picky about field lengths and will cause an exception if the log is too long. [YOCTO #8475] (Bitbake rev: 349119f44cdad240dda7f4db45992e2539e1416f) 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: Remove all navigation when not in build modeElliot Smith2015-10-272-4/+14
| | | | | | | | | | | | | | | | | | | | | | The user is redirected to the all builds page or all projects page from the landing page, regardless of mode. In build mode, this makes sense; but in analysis mode, we are restricting the view to just the cli builds project. This means that "all projects" and "all builds" only contains items relating to this one project. Modify the landing page so it redirects to the project builds page for the cli builds project when not in build mode. Also remove navigation elements which are irrelevant when not in build mode. [YOCTO #8514] (Bitbake rev: ae754655fa1bc5168f43e8821773e7b7b9440a5d) 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: Run tests in build modeElliot Smith2015-10-271-0/+6
| | | | | | | | | | | | | | Now that the UI content is conditional on whether BUILD_MODE is active, modify the existing tests so that they run in this mode by default. [YOCTO #8514] (Bitbake rev: 991712f3f88759e2d68af5a3fe83c1395c4f67f6) 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 builds for non-cli projects in analysis modeElliot Smith2015-10-271-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | The "latest builds" sections of the "all builds" page show builds for all projects. This is not appropriate for analysis mode, where we can only affect the command-line builds project. Modify the "latest builds" section to only show builds for the command line builds project if in analysis mode. Also rationalise where we get the queryset of latest builds from: we have a _get_latest_builds() function which was being used to get the latest builds in most places, but not all. Also modify _get_latest_builds() to sort by started_on, rather than primary key, as assuming that a higher primary key value equates with later start time is incorrect. [YOCTO #8514] (Bitbake rev: 52de2c8cd11fa743f8fd7cb0cf776eea622ac474) 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 top bar buttons in analysis modeElliot Smith2015-10-271-5/+13
| | | | | | | | | | | | | | | The "new build" and "new project" buttons are irrelevant in analysis mode, as you can't start a build or a project. Hide these buttons if not in BUILD_MODE. [YOCTO #8514] (Bitbake rev: b1858653c22eb6d51fc23f75ccad69b76523eb41) 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 mode-appropriate landing pageElliot Smith2015-10-271-45/+58
| | | | | | | | | | | | | | | | | | | | The same landing page is shown for both analysis and build modes. This means that users in analysis mode can see options which are not available or broken in that mode. Modify the landing page template to show a simple "run a build" message if the user is in analysis mode and has no builds yet. Also clean up the landing page HTML, because the indentation was a mess and the HTML was invalid. [YOCTO #8514] (Bitbake rev: 86b4a10cc817abb5e3e63360dc8b3c550337f17c) 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: Add BUILD_MODE flag to contextElliot Smith2015-10-273-5/+7
| | | | | | | | | | | | | | | | | | | | We set a TOASTER_MANAGED env variable in the startup script, which has a value of "1" if Toaster should run in build mode. Add a BUILD_MODE variable to settings.py which is True if TOASTER_MANAGED is set to "1", False otherwise. Add this to the context for every template, so we can use this information to conditionally alter the content of pages according to the mode we're in. [YOCTO #8514] (Bitbake rev: f9cf4739fc85c9760ce748323dc7c8de3fa7eaec) 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: Add tests for error message display on the build dashboardElliot Smith2015-10-161-2/+89
| | | | | | | | | | | | | | Add tests to ensure that log messages with CRITICAL level and with EXCEPTION level are shown in the main errors display on the build dashboard. [YOCTO #8320] (Bitbake rev: 7b3ed62800cb7352154897c1c5ad2440a54df198) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Modify "New build" button behaviour for cli builds projectElliot Smith2015-10-163-51/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | The "New build" button should only be displayed if there are user-generated projects, not if there is only the command-line builds project. (Toaster can't run builds on behalf of the command-line builds project.) The "New build" form should also display as if no project has been set (i.e. show the project and recipe text entries). Add a variable which tracks the number of non-command-line projects, then use this to hide the button when appropriate. Also track whether the current project is the default one, and use this to add extra conditions to when the "New build" text entries are shown. [YOCTO #8231] (Bitbake rev: 07e7bc29a7d976941eeae997f78a25ed6edddfc8) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Clean up template codeElliot Smith2015-10-162-16/+10
| | | | | | | | | | | | | | | | | Some errors in the HTML template didn't show up until they were rendering command line builds. One useless conditional was lingering in another template. Clean up these issues to display the latest builds section correctly. (Bitbake rev: c781d6be94a25f942946d3a406e07791385e4596) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: More linting of testsElliot Smith2015-10-161-21/+14
| | | | | | | | | | | Fix some more lint errors on the tests for toastergui. (Bitbake rev: a31710db562a91da8ef37f5cd2231132474f46da) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Show tooltip next to cli builds project name in all buildsElliot Smith2015-10-163-12/+41
| | | | | | | | | | | | | | In the all builds page, show an icon with tooltip next to the command line builds project name. [YOCTO #8231] (Bitbake rev: 0240d92c6a508e0b22f37b3ea804171dd3dea5a6) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Hide tabs and add info popups for command line buildsElliot Smith2015-10-164-43/+94
| | | | | | | | | | | | | | | | | | Command line builds don't have a configuration or layers which can be modified through Toaster. Change the project builds page for the command line builds project, to hide the tabs and add some info popups in appropriate places on that page. [YOCTO #8231] (Bitbake rev: 565611749d47c915035890db60d19ab2fca7c42e) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Make the builds view the project page for "command line ↵Elliot Smith2015-10-166-11/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | builds" Command line builds don't have configuration or layers which can be manipulated in Toaster, so these pages shouldn't be visible. However, the configuration page is the default page for the project view (/project/X/), which isn't correct for the command line builds project. Modify all project page links across the application so that the command line builds project (aka the "default" project) always displays the builds tab. Add a project_url tag for templates which contains the logic determining where the URL for a project links to, based on whether it is the default project or not. [YOCTO #8231] (Bitbake rev: 3ea10f4c16a557e94781251f6776b13acb8e9eba) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Replace "Run again" button with help text for cli buildsElliot Smith2015-10-163-14/+65
| | | | | | | | | | | | | | | | | | | | It's not possible to run a command-line build again, as Toaster doesn't have access to the data used for that build. Replace the "Run again" button with an icon which pops up some help text to that effect. Add test to check that the run again button is hidden and the help icon displayed instead for command-line builds. [YOCTO #8231] (Bitbake rev: b67ac9e7cbab50951847dd1a63b12f41bb345dbb) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Exclude "command line builds" project from projects typeaheadElliot Smith2015-10-161-2/+2
| | | | | | | | | | | | | | | | | The "New build" drop-down provides autocomplete for Toaster projects. However, it should not include the default project (for command line builds), as it should not be possible for the user to select this project as the container for a Toaster build. [YOCTO #8231] (Bitbake rev: d6210cd75b0cd8b6d24d5e99f607ba5cc45daf97) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Show 'not applicable' for default project machine and releaseElliot Smith2015-10-162-13/+111
| | | | | | | | | | | | | | | | | | | | | | | The machine and release for the default project should show as 'not applicable' on the all projects page, as that information isn't available for command-line builds. Modify the templates with some conditionals to check for the default project row, plus some data-* attributes to mark where that data is to make testing possible. Add some tests for the all projects page to ensure that the correct machine/release are still shown for non-default projects, and 'not applicable' for the default project. [YOCTO #8231] (Bitbake rev: ce27b3fd728f0373aa1adc0d47baace264529b45) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Reorganise and lint testsElliot Smith2015-10-161-34/+49
| | | | | | | | | | | | Get test suite ready to accommodate new tests for how command line builds are shown on various pages. (Bitbake rev: 1ee1fc5dcdbb26c9f6e04b7719d7196083212d4c) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Allow any text input to machine configuration variableMichael Wood2015-10-161-8/+12
| | | | | | | | | | | | | Allow any text input to the machine variable; as we may not have discovered all the available machines until after a build. [YOCTO #8418] (Bitbake rev: f44b34833f164daf34c57703429ed8f122888037) 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: Guard against builds with no targetsElliot Smith2015-10-161-2/+7
| | | | | | | | | | | | | | | | | | Although this probably can't happen in practice (builds without targets), this constraint is not currently enforced in the data model. In the unlikely event that a build has no target (e.g. in test cases), this causes a template rendering error. Rather than rework the data model, add a guard to the template to prevent it from rendering the target name if there are no targets associated with the build. (Bitbake rev: 4f409d8c01bae898ea142bd1417db99e12067753) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Remove Toaster exceptions section of build dashboardElliot Smith2015-10-162-45/+4
| | | | | | | | | | | | | | | | | Fatal build errors were displayed as exceptions, and highlighted with less severity than they deserved. Roll back to treating Toaster exceptions as errors by removing the toaster_exceptions member on Build objects and displaying EXCEPTION events in the errors section on the dashboard. [YOCTO #8320] (Bitbake rev: 59197320bdcefddf06084e871f1b5b21b21cbb63) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Record critical errorsElliot Smith2015-10-162-12/+19
| | | | | | | | | | | | | | | | | | | | Critical errors (where a build failed for reasons of misconfiguration, such as a machine being specified which is not in a project's layers) were being ignored (only log records up to ERROR level were being logged to Toaster's db). This meant that the build would fail but would not correctly report why. Add support for CRITICAL error levels to the LogMessage model, include errors at this level in the errors property for a build, and show errors at this level in the build dashboard. [YOCTO #8320] (Bitbake rev: b6eacbca9cacb607de864ab7d093deb296da8226) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Test that exception isn't thrown by project pageElliot Smith2015-10-161-0/+30
| | | | | | | | | | | | | | | | | Add a test which checks that an exception is no longer thrown for the /toastergui/project/X page for the default project. Note that we still get a spinning dialogue box on this page because the default project has no configuration to display, but at least it doesn't fail altogether. [YOCTO #8277] (Bitbake rev: 8795667d03bd8705d7e13c5d3d6bb6da371fa91d) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Check whether buildrequest exists before using itElliot Smith2015-10-161-2/+18
| | | | | | | | | | | | | | | | | | | | Builds initiated from the command line don't have a buildrequest associated with them. The build.buildrequest association is only added if a build is triggered from toaster. Some of the code for displaying the status of a build refers to build.buildrequest without checking whether it has been set, which causes an error to be thrown. Add a guard to check whether the buildrequest has been set. [YOCTO #8277] (Bitbake rev: af33409612139ab2347baf6b847b23faea19752d) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Disable add layer button when input is emptyBelen Barros Pena2015-10-161-0/+6
| | | | | | | | | | | | | | | | | | | | The 'add layer' button in the project configuration page is enabled when you select a layer from the type ahead. However, if you delete the layer name, the 'add layer' button remains enabled, and if you click it, the last selected layer from the type ahead will be added to the project. It is probably better to disable the 'add layer' button when the input field is empty. [YOCTO #8449] (Bitbake rev: d4820f16c76398400ddd573db03c654c51d40c1b) 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: Have 'Version' next to recipe nameBelen Barros Pena2015-10-161-3/+3
| | | | | | | | | | | | | | | | In all Toaster tables we show the version next to the recipe or package names, with one exception: the recipes table in the layer details page, where we are showing the version next to the recipe description. This patch moves the version column next to the recipe name, for consistency with all other Toaster tables. (Bitbake rev: b5af7084b28158a8a9eaf78db463555ae8e0f620) 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: Improve directory structure layoutBelen Barros Pena2015-10-163-8/+16
| | | | | | | | | | | | | | | | | | | File names in the directory structure often wrap due to big indenting for nested files and directories, unnecessary width in certain columns, and not using colspan when the symlink and package cells are empty. The wrapping makes the table harder to read. This patch reduces the amount of indenting, limits the width of the 'Size', 'Permissions', 'Owner' and 'Group' columns, and sets colspan to use the white space of the symlink and package names when empty. (Bitbake rev: 6167ee5a7569d8f841c340e672645cc133ea5a31) 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: importlayer Update property names for importlayer api callsEd Bartosh2015-10-161-7/+6
| | | | | | | | | | | | | Update the property names used in checking for existing layers. The server side API changed but not all references were updated. [YOCTO #8300] (Bitbake rev: 1cbf0cf77a638257e18066f911fe4c4e13c278c6) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix missing tooltips from layers on project configuration pageMichael Wood2015-10-132-10/+11
| | | | | | | | | | | | | | | | | | Re-enable the layer tooltips on the project configuration page. This adds the required fields to the API used for the layer dependencies to be able to show the metadata needed. Also fixes link hrefs which were missing in the add layers confirmation dialog (bug 8251). [YOCTO #8295] [YOCTO #8251] (Bitbake rev: c7cb8255d0ab1fd7715e878c1c83ef0cd920387e) 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: Fix broken test caseEd Bartosh2015-10-121-1/+1
| | | | | | | | | | | Fixed test_show_tasks_in_projectbuilds broken by latest changes in project build view. (Bitbake rev: 3c72c7634ab69a5eb18aa20a5c6d16a3e2666f62) 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: toaster: exclude recipes with empty namesEd Bartosh2015-10-121-1/+1
| | | | | | | | | | | | | | Modified get_all_compatible_recipes function to exclude recipes with empty names from the result queryset. This should stop UI to show recipes with empty names in compatible recipes page. [YOCTO #7969] (Bitbake rev: f7c1bd49e2e28d12c6604f5ae54bc96e1e7b6946) 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: delete recipe if it can't be savedEd Bartosh2015-10-121-0/+1
| | | | | | | | | | | | | | | | Due to Recipe model constraints some recipes can't be saved. However, they still can create incomplete records in the database. This causes all sorts of errors when Toaster operates with those objects. Removing them should fix those issues. [YOCTO #7969] (Bitbake rev: 4d76a9e418fd98a7882aa29f974a7389f9689314) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Remove project name from latest project buildsBelen Barros Pena2015-10-121-2/+4
| | | | | | | | | | | | | | The 'latest builds' list in the project builds page does not need to show the project name, since it lists only builds for the selected project. This patch removes the redundant project name. (Bitbake rev: 065652b9c649135f9e2fc5d9ba90e98f560dccdd) 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: test get_alldeps APIEd Bartosh2015-10-121-1/+19
| | | | | | | | | | Added test case to test Layer_Version.get_alldeps API. (Bitbake rev: 159aa333c2f6344b5b37911c3f09601b9f0df6d8) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix orm testsEd Bartosh2015-10-121-29/+4
| | | | | | | | | | | Cleaned up and fixed orm tests. Removed test_build_layerversion as it's not needed due to changed compatible_layer_versions API. (Bitbake rev: 73ea29ed065bfaa80ee368b2a38c157e36fe1676) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix NameErrorEd Bartosh2015-10-121-1/+1
| | | | | | | | | | Fixed exception: NameError: global name 'DoesNotExist' is not defined (Bitbake rev: eee5311b867d3c8c33e06d04e103bfd3647146f4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: use get_alldeps in layerdetails rendererEd Bartosh2015-10-121-2/+2
| | | | | | | | | | | | | Used Layer_Version.get_alldeps api in layerdetails template renderer to get list of layer dependencies. [YOCTO 8004] (Bitbake rev: 077d0f41a3bd9cf2802a1488f1d6156ccac7df1d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: implement API to get full list of depsEd Bartosh2015-10-121-0/+19
| | | | | | | | | | | | | | | | | | Implemented Layer_Version.get_alldeps API to recursively get full list of dependencies for the layer. Dependencies that are already in the project are filtered out from the result. Result list of Layer_Version objects is sorted by layer name for UI to look consistent. This API is going to be used to show amount and list of dependencies for the layer in the list of compatible layers for the project. (Bitbake rev: 7d853a3054a9ae3d18eb6f5bc13ba27d2795c31a) 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: Don't descend into directories for cached_layersMichael Wood2015-10-111-13/+16
| | | | | | | | | | | | | | | | | | | | | | As toaster makes use of clones of itself we have a mechanism to just clone the current checkout and use that as a basis for the git clone for the layers inside. For instance, in poky, if we're running in that directory, we don't ever want to change the current checkout so we make a copy of ourselves to do this work in. This steps through cached_layers and previously-traversed directories inside the current checkout to find any pre-existing checkouts. This was ending up traversing too many directories down, so remove the traverse and only deal with the current directory. [YOCTO #8463] (Bitbake rev: 9c40b3b6377ab8f5d6ac9b8e00585b71de00bf74) 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: Update JS unit testsMichael Wood2015-10-112-20/+28
| | | | | | | | | | | | | | | | | Update JS unit tests. - Expand the add remove layer check to make sure that the layer is actually added to the project. - Remove some unused vars - Make sure that the layers/project ids will always exist at the point of running the test. - Add the missing typeahead input fields to the dom to fix the failing typeahead test. (Bitbake rev: 46af40b95f842aa14ef7e3f0d516aef3899d5e42) 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: Fix stale layer state buttonsMichael Wood2015-10-117-18/+27
| | | | | | | | | | | | | | | | Move the "is available to the project" state computation to the template for the Layer add/remove buttons, Recipe build/Add layer as done for the Package add/remove. This is more reliable as we can get an inconsistent state on the front end JS as there are many opportunities for hitting out of date project information. [YOCTO #8294] (Bitbake rev: 43469c3360566ad4897785f14f8717a9bc8b6078) 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: tables Add the recipe filter back into the Recipe tableMichael Wood2015-10-111-0/+13
| | | | | | | | | | | | Add the "Is recipe currently available in the project" filter back to the Recipe table which was removed when we had intermediate AvailableRecipe tables. (Bitbake rev: b3682d1d851e616efa0715f9d43815a92e259432) 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: Fix typo in returning pk list of layer versions in current ↵Michael Wood2015-10-111-1/+1
| | | | | | | | | | | | | project This was accidentally returning the primary key of the ProjectLayer rather than the ProjectLayer.Layer_Version.pk (Bitbake rev: b20f3626148e89af0e9fcfca911a5a1e4e355a41) 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 update build recipe button class nameMichael Wood2015-10-111-2/+2
| | | | | | | | | | | | Update the class name which we are using for the recipe build button. This fixes a regression in the buttons being enabled/disabled when adding and removing the layer being viewed from the project. (Bitbake rev: cc63f10f69105205e65b5f9647232b2b4b23ad48) 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: Hide "Download build log" button if log doesn't existElliot Smith2015-10-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Our builds pages show all builds, but also include build requests which may have resulted in a build failure, before the build started (e.g. at the recipe parsing stage). In such cases, the BuildStarted event is not captured by Toaster, so we have no idea where the log file for the failed build is. The result is that a build is shown by the Toaster UI /builds/ pages, but it is really a pretend build which never went beyond being a build request, and which has no associated log file. In turn, this breaks the "Download build log" button on the build dashboard, as there's no log file associated with the build. Fix this by hiding the "Download build log" button for builds which don't have a cooker_log_path. [YOCTO #8373] (Bitbake rev: 89e6cd03aa11c886f28520557af6c7ad51827b0e) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix naming for clone directoryEd Bartosh2015-10-111-1/+1
| | | | | | | | | | | | | | Toaster uses git url and branch to make a clone directory name. Current code leaves '@' and '%' characters unchanged, which can cause generation of wrong directory names. Fixed this issue by replacing '@' and '%' with underscore. (Bitbake rev: e076888a2120a37c388930073694750735d86507) 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: toaster: get rid of interactivity in bldcontrolbrian avery2015-10-111-101/+37
| | | | | | | | | | | | | | | | | | removed layer dir questions and base off TOASTER_DIR removed build dir questions and base off TOASTER_DIR base configuration file off of TOASTER_CONF fixed some pylint issues [YOCTO #8217] (Bitbake rev: d5811968b5f22093365f381fb7e75ab46e5269c2) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Machines filter don't pass self in as parameterMichael Wood2015-10-111-1/+1
| | | | | | | | | | | | Fix typo don't pass self in as a parameter, this evaluated to true giving the wrong results meaning the machines typeahead did not return valid results. (Bitbake rev: 55ba889ef8900c95447861fa3985ca9cfe06afdf) 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>