summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-08-10toaster: buildinfohelper Add handling local layers (i.e. non-git) layersmichaelw/toaster/bitbake-review_queue_8_8_16Michael Wood
Adds handling of the non-git layers to create and update the corresponding layer objects in Toaster. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-10toaster: bldcontrol model BRLayer Add corresponding local_source_dirMichael Wood
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. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-10toaster: adapt xhr_import_layer test locally imported layerSujith H
Update xhr_import_layer test to use locally imported layer in local_source_dir. [YOCO #9911] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: update build configuration pageSujith H
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] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: update recipe details pageSujith H
Update Layer branch and Layer commit in recipe details page. For local layer imported from toaster these fields are not applicable. [YOCO #9911] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: update package detail pageSujith H
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] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: updte build tables for locally imported layersSujith H
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] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: update the tables informationSujith H
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] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: collect details for local dir imported from uiSujith H
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] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: add local_source_dir field to modelSujith H
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] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: add local directory to the dbSujith H
Adding local directory to the database. The local directory is added to vcs_url, field of db. [YOCO #9911] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: improve the display when local dir is addedSujith H
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] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: update css file for layer importBelen Barros Pena
Update the css file for the layer import. This changes will improve the UI for the task. [YOCO #9911] Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
2016-08-10toaster: add local_source_dir to the needed_fieldsSujith H
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] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: control the selection of git and local repoSujith H
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] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: add import of local directory to UISujith H
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] Signed-off-by: Sujith H <sujith.h@gmail.com>
2016-08-10toaster: fix unhandled exceptionEd Bartosh
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. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-08-10toasterui: ensure that the Build object is always availableElliot Smith
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. Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster-tests: add test for showing self-dependent taskElliot Smith
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] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster: prevent infinite loop when finding task dependenciesElliot Smith
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] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster-tests: add tests for reverting to default sortElliot Smith
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] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster: reset table to default orderby when orderby column is hiddenElliot Smith
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] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster: show loading spinner after creating custom imageElliot Smith
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] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster-tests: fix erroneous message when test failsElliot Smith
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. Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster-tests: add tests for most recent builds state changesElliot Smith
Add tests for the state transitions in the "most recent builds" area of the all builds page. [YOCTO #9631] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster-tests: add tests for build dashboard menu and summary visibilityElliot Smith
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] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster-tests: add tests for build time links in the all builds pageElliot Smith
When a build fails, it shouldn't have links on its build time in the recent builds area or in the all builds table. [YOCTO #8443] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster: adjust build dashboard for failed buildsElliot Smith
Remove the side bar and build details modules for failed builds. [YOCTO #8443] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster: add started property to BuildElliot Smith
Add a property to the Build model which records whether the BuildStarted event has occurred for the build. The proxy for this event is the presence of variables recorded against the Build: as the buildinfohelper only saves variables when the BuildStarted event occurs (as the variables aren't available on the bitbake server before that point), we can tell whether BuildStarted has happened by counting Variable objects on the Build. This can then be used to determine whether a Build "properly" started, enabling a different dashboard display (left-hand menu hidden) if the build didn't record any useful information (e.g. if it had a bad target). [YOCTO #8443] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster: remove links from time field on failed buildsElliot Smith
Failed builds don't have any time data recorded for them, so the time field in the builds table, the time shown in the recent builds area, and the build time shown in the build dashboard should not be links for failed builds. [YOCTO #8443] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster: tweak styling and typos in recent builds areaElliot Smith
Help icons need to have the Bootstrap tooltip() method called on them so that the popups are correctly styled. Ensure that the colour of the help/error/warning icons is correct, depending on the build state. Fix pluralisation of errors and warnings shown. Add a div around the build state area so it's easy to pick up where the state is going to display (e.g. in tests). [YOCTO #9631] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster: show "Tasks starting..." until the first task completesElliot Smith
To prevent showing a "0% of tasks complete" message for a long time, don't show the progress bar until the first task has finished. While waiting for that first task, show a message about tasks starting instead. [YOCTO #9631] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster: show progress of recipe parsing in recent builds areaElliot Smith
Modify buildinfohelper and toasterui so that they record the recipe parse progress (from ParseProgress events in bitbake) on the Build object. Note that because the Build object is now created at the point when ParseStarted occurs, it is necessary to set the build name to the empty string initially (hence the migration). The build name can be set when the build properly starts, i.e. at the BuildStarted event. Then use this additional data to determine whether a Build is in a "Parsing" state, and report this in the JSON API. This enables the most recent builds area to show the recipe parse progress. Add additional logic to update the progress bar if the progress for a build object changes. [YOCTO #9631] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster: move most recent builds templating to clientElliot Smith
The most recent builds area of the all builds and project builds table needs to update as a build progresses. It also needs additional functionality to show other states (e.g. recipe parsing, queued) which again needs to update on the client side. Rather than add to the existing mix of server-side templating with client-side DOM updating, translate all of the server-side templates to client-side ones (jsrender), and add logic which updates the most recent builds area as the state of a build changes. Add a JSON API for mostrecentbuilds, which returns the state of all "recent" builds. Fetch this via Ajax from the build dashboard (rather than fetching the ad hoc API as in the previous version). Then, as new states for builds are fetched via Ajax, determine whether the build state has changed completely, or whether the progress has just updated. If the state completely changed, re-render the template on the client side for that build. If only the progress changed, just update the progress bar. (NB this fixes the task progress bar so it works for the project builds and all builds pages.) In cases where the builds table needs to update as the result of a build finishing, reload the whole page. This work highlighted a variety of other issues, such as build requests not being able to change state as necessary. This was one part of the cause of the "cancelling build..." state being fragile and disappearing entirely when the page refreshed. The cancelling state now persists between page reloads, as the logic for determining whether a build is cancelling is now on the Build object itself. Note that jsrender is redistributed as part of Toaster, so a note was added to LICENSE to that effect. [YOCTO #9631] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10cooker: add BuildInit eventElliot Smith
In situations where a bitbake run fails before the build properly starts and BuildStarted is fired, a UI has no way to get at the targets passed to the build. This makes it difficult for the UI to report on the targets which failed. Fire a BuildInit event before running buildTargets() or buildFile(). This enables a UI to capture targets passed to buildTargets(), even if the build fails (e.g. the targets themselves are invalid). [YOCTO #8440] Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster: tests test_new_project_page Catch button not enabled exceptionMichael Wood
When using firefox and selenium we get an exception generated when a disabled button click is attempted. This should happen in the test but we need to catch the exception to make sure it doesn't cause the test to fail. [YOCTO #10056] Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com>
2016-08-10toaster: fixtures Add READMEMichael Wood
Add README to explain fixtures directory Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-10toaster: Remove old toaster config loading mechanismMichael Wood
This has been replaced using django's inbuilt loaddata. Django command documented at: https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-loaddata Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-10toaster: lsupdates Add spinner for parsing/http fetchMichael Wood
Adds a spinner so that you know that the parse and http fetch from the layerindex is in progress. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-10toaster: checksettings call django's loaddata instead of custom commandMichael Wood
Call django's inbuilt loaddata command to load the appropriate fixtures. We also attempt to load a fixture called "custom" and fail silently if we don't have one. This is where initial customisations can be done to load particular settings or data into Toaster (for example layers or default values for variables) Make sure the value for TEMPLATECONF is available to checksettings so that we can have a go a working out which default data to load. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-10toaster: Add poky and openembedded configuration fixturesMichael Wood
These fixtures provide a recommended default configuration of toaster for either using bitbake and oe-core or as part of poky. They can be used as the sample configuration for writing custom configurations. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-10fetch: Fix use of tar's --exclude option for tar >= 1.29Mariano Lopez
Starting from tar 1.29 the --exclude option won't work anymore if is not used before the path. There are some fetch modules that copy the ptest using tar and --exclude option. This fixes these for bitbake. [YOCTO #9763] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-02bitbake-user-manual: Applied typo fix to "Override Style Operation Advantages"Scott Rifenbark
Fixes [YOCTO #9985] Fixed an operator typo from ":=" to "+=" in the note at the bottom of the section. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2016-08-02bitbake-user-manual: Changed bitbake command example.Scott Rifenbark
Fixes [YOCTO #7718] In the "Executing a List of Task and Recipe Combinations" section, I changed the improper bitbake command example to use the correct syntax. This change was review feedback. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2016-08-02bitbake-user-manual: Updated the PROVIDES variableScott Rifenbark
Fixes [YOCTO #10011] Added paragraphs near the end to describe the role of virtual targets. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2016-08-02bitbake-user-manual: Added non-existant variable expansionScott Rifenbark
Fixes [YOCTO #10003] I added a small paragraph explaining what happens when expansion of a variable that does not exist occurs. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2016-08-02bitbake-user-manual: Applied some review commentsScott Rifenbark
Fixes [YOCTO #9985] Fixed some problems with the changes. A small typo for an example and added a clarifying operator in another sentence. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2016-08-02bitbake-user-manual: Updated the "Inline Python Variable Expansion" section.Scott Rifenbark
Fixes [YOCTO #9984] Added a small note to the bottom to help clarify. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2016-08-02bitbake-user-manual: Fixed override operator syntax.Scott Rifenbark
I had inconsistent usage of the "_append" style operator syntax in the chaper. I was using a mix of <filename>_append</filename> and "_append". I changed to "_append" for consistency. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2016-08-02bitbake-user-manual: Clarified override-style operators.Scott Rifenbark
Fixes [YOCTO #9985] Made the following changes: * Section Removal (Override Style Syntax): Added a small qualifying sentence at the end to further define behavior * Added new section "Override Style Operation Advantages": This section provides some rationale behind the "_append" style operations. * Section "Examples": Changed an example to use the "=" operator rather than the "+=" operator. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>