summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-08-02toaster-tests: add test for showing self-dependent taskmichaelw/submit/elliot/9475-9631-9836-9952_combinedElliot 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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster: 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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster-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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster: 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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster: 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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster-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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster-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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster-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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster-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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster: 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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster: 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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster: 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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster: 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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster: 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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster: 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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02toaster: 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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-02cooker: 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> Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-01lib/toaster: Fix missing new files from previous commitsRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-29toaster-tests: fix URL given for Chromedriver downloadElliot Smith
The link to the Chromedriver downloads page is dead, so put in the correct URL. Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-29toaster-tests: define capabilities for latest Firefox driverElliot Smith
For the latest Firefox versions, WebDriver requires a download of a separate binary and an additional capability to be defined on it. Modify our tests so that when "marionette" is set as the browser, this capability is defined on the Firefox driver. Also add a note to the README about the additional installation steps required. 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>
2016-07-29lib/bb/checksum: avoid exception on broken symlinksPaul Eggleton
If using OE's externalsrc with a source tree that is not tracked by git and contains broken symlinks, you can receive "TypeError: unorderable types: NoneType() < str()" within the file checksum code due to: checksums.sort(key=operator.itemgetter(1)) Don't add files with no checksum to the checksums list in order to avoid this. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-29lib/bb/utils: show subprocess output in stack tracesRoss Burton
If better_exec() throws a subprocess.CalledProcessError then show the output to the user as it likely contains useful information for solving the problem. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-29fetch2: fix pickle issues while switching from master to krogothMaxin B. John
While switching from master to krogoth build with a common download directory, got a large number of warnings like the one listed below: WARNING: freetype-2.6.3-r0 do_fetch: Couldn't load checksums from donestamp /home/maxin/downloads/freetype-2.6.3.tar.bz2.done: ValueError (msg: unsupported pickle protocol: 4) These warnings are caused by the difference in pickle module implementation in python3(master) and python2(krogoth). Python2 supports 3 different protocols (0, 1, 2) and pickle.HIGHEST_PROTOCOL is 2 where as Python3 supports 5 different protocols (0, 1, 2, 3, 4) and pickle.HIGHEST_PROTOCOL is obviously 4. My suggestion is to use 2 since it is backward compatible with python2 (all the supported distros for krogoth provides python2 which supports pickle protocol version 2) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-26lib/bb/build: handle incomplete message fragments in log FIFORoss Burton
It's possible that the logging FIFO doesn't do a complete read (or the sender a complete write) with the result that an incomplete message is read in bitbake. This used to result in silently truncated lines but since 42d727 now also results in a warning as the start of the rest of the message isn't a valid logging command. Solve this by storing incoming bytes in a bytearray() across reads, and parsing complete messages from that. [ YOCTO #9999 ] Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-25toaster-tests: add tasks and recipes sub-page testsElliot Smith
Add tests for the tasks and recipes sub-pages of the build dashboard. [YOCTO #9833] 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>
2016-07-25toaster: set non-hideable columns for built recipes tableElliot Smith
None of the columns in the built recipes table are marked as not hideable, so it is possible to remove all the columns and make the table disappear. Set the recipe name and version columns as not hideable. Also rename the "Name" column to "Recipe", for consistency with the design and with other recipe tables. [YOCTO #9833] 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>
2016-07-25toaster: set non-hideable columns for build tasks tableElliot Smith
The task, recipe and order columns in the build tasks table should not be hideable. If they are, it's possible for the table to have all of its columns hidden so that it no longer displays. Set the hideable property to prevent these columns from being hidden. [YOCTO #9833] 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>
2016-07-25toaster: fix download URL for task logsElliot Smith
The task display template formatting had split the Django url template tag across two lines and broken it. This resulted in a gibberish URL for task logs. Fix by placing the tag and its arguments on a single line. [YOCTO #9837] 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>
2016-07-25fetcher2/__init__: Print command in case of ExecutionError in runfetchcmdMario Domenech Goulart
Signed-off-by: Mario Domenech Goulart <mario.goulart@bmw-carit.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-25toaster: loadconf Partially add back some of the layerSource parsingMichael Wood
Partially add back a revised version of the layersource handling so that we can continue to support the old toasterconf.json and it's setup of the local project. 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>
2016-07-25toaster: admin Add Layer_Version to the admin-able modelsMichael Wood
If the migration didn't get the release conversion right for say, a local or imported layer it would be handy to be able to edit this in the django admin page. Also useful for developers to be able to tweak layers on the fly. 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>
2016-07-25toaster: orm Remove the layerindex specific up_branch fieldsMichael Wood
We don't need to keep track of layerindex data in our database. And using branch==release is very confusing in the schema. Instead use the existing Release definition to keep track of which release a layer_version is for. Remove the Branch model and all references to it. Create a migration path to convert from up_branches to their corresponding releases. 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>
2016-07-25toaster: lsupdates Add progress information and clean up loggingMichael Wood
Adds basic progress % information and provides better description of what is happening. 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>
2016-07-25toaster: tests: Remove references to LayerSource modelMichael Wood
Remove and replace layersource model references in the tests and test data. Remove the orm/test as this only tested LayerSource interactions which have now been removed. 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>
2016-07-25toaster: Replace references to LayerSource modelsMichael Wood
Replace references to the now deprecated layersource models across Toaster with the new enums for layer source types. 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>
2016-07-25toaster: lsupdates Add layerindex fetcherMichael Wood
Move and refactor the layerindex layer source update mechanism so that we don't have to track the layerindex objects in the toaster database. Move this out of the orm and into the management command. Paves the way for future improvement to allow you to specify a layer index server as an argument to the command. 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>
2016-07-25toaster: models Remove LayerSource models and replace with enumMichael Wood
We had a lot of complexity around different layer sources to allow for multiple sources and different priorities for these source. This was implemented using rigged abstract classes which represented the different layer sources when in fact just an enum/flag on the layer_version object is sufficient for our needs. Remove the LayerSourcePriority object as this is not needed. We no longer have a problem of multiple layers coming from multiple sources so this is not needed. Two migrations are added to first remove the child models which represented layersources. Then a second migration is needed to remove the LayerSource model it's self as Django can't understand the non-standard base class dependency. Triggering this issue: https://docs.djangoproject.com/en/1.8/topics/migrations/#dependencies Clean up a number of flake8 warnings in classes which were modified. [YOCTO #9853] 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>
2016-07-25toaster: bldcollector admin Remove LayerSourceAdminMichael Wood
Remove the LayerSource admin from django admin interface. LayerSources are not going to be manageable from the admin interface. 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>
2016-07-25toaster: loadconf remove Loading LayerSourcesMichael Wood
We don't need to configure layer sources in the initial configuration as this information is provided by the models. 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>
2016-07-25lib/bb/progress: avoid possibility of start event being reported twicePaul Eggleton
In MultiStageProgressReporter, set a guard when we start the progress so that it can't happen more than once. This fixes "Initialising tasks.." being shown twice in succession when running bitbake in non-interactive terminal mode. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-25knotty: don't display ETA for tasks with progressPaul Eggleton
It turns out that progress information we can extract from a task is rarely apportioned closely enough to the time taken for the ETA to be accurate, so showing it is going to be misleading most of the time for anything but the most basic of examples. Let's just remove it and avoid misleading (or worse, annoying) the user. Fixes [YOCTO #9986]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-25knotty: fix some minor bugs in BBProgressPaul Eggleton
If you specify custom widgets then we don't want to assume where the "extra" position is - you should have to specify it, and if it isn't specified it shouldn't just wipe out the last widget or you can start to see odd behaviour if you're modifying the code. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-22fetch: copy files with -HEnrico Scholz
When using a PREMIRROR with plain (non-unpack) files, a SRC_URI like SRC_URI = "file://devmem2.c" will cause devmem2.c to be a symlink in the WORKDIR pointing to the local PREMIRROR. Trying to apply a patch on this file will either modify the file on the PREMIRROR or will fail due to sanity checks: ERROR: devmem2-1.0-r7 do_patch: Command Error: 'quilt --quiltrc /cache/build-ubuntu/sysroots/x86_64-oe-linux/etc/quiltrc push' exited with 1 Output: Applying patch devmem2-fixups-2.patch File devmem2.c is not a regular file -- refusing to patch Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-22cache: Don't interleave pickle cache file writingRichard Purdie
For some reason the data written in this way is coming back out the files out of order. I've not been able to simplify the test case to a point where this was standalone reproducible. Simplify the code and write out the cache files sequentially since this seems to avoid the errors and makes the code more readable. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-22cache: Add better cache loading sanity checksRichard Purdie
We've seen cache corruption where the pairs come out in a different order to the way we saved them for unknown reasons. Add better sanity checking to give a more user friendly error rather than a crash/traceback. Also allows the system to reparse and recover. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-22cache: Drop/simplify pointless type checkingRichard Purdie
Since we no longer have random data like version fields in these structures and we can assume any extra cache data subclasses our class, simplify the code. This is mostly reindenting after removal of the pointless type checks. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-22cache: Improve versions fields handlingRichard Purdie
Firstly, don't store the versions fields in memory in the cache objects data store. This just complicates the code for no good reason. Secondly, write the version fields to all cache files, not just the core one. This makes everything consistent and easier. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-22cache: Correctly handle missing extra cachesRichard Purdie
If an "extras" cache file is corrupted, the system would not notice and later fail with errors about missing entries. Add a test for this which means we can fall back to re-parsing in those cases. [YOCTO #9902] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-22cache: Move the parsing message to a more logical placeRichard Purdie
Otherwise you can look at the log and wonder why parsing isn't happening when it really is due to other code paths. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-21bitbake: implement idle timeout for xmlrpc serverEd Bartosh
Idle timeout can be specified either by -T/--idle-timeout option or by sessing BBTIMEOUT environment variable. Bitbake xmlrpc server will unload itself when timeout exprired, i.e. when server is idle for more than <idle timeout> seconds. [YOCTO #5534] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>