]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/log
thirdparty/openembedded/openembedded-core-contrib.git
9 years agolib/bb/build.py: remove task flag in deltask()
Robert Yang [Wed, 15 Jun 2016 02:42:10 +0000 (19:42 -0700)] 
lib/bb/build.py: remove task flag in deltask()

Otherwise the function like d.getVarFlag(e, 'task', True) which is used by
do_listtasks will still get it, and list the deleted tasks.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker: clean up EvertWriter
Ed Bartosh [Mon, 20 Jun 2016 11:00:52 +0000 (14:00 +0300)] 
cooker: clean up EvertWriter

Restructured EventWriter code to make it more readable:
 - got rid of init_file method as it's called only once
 - renamed exception variable e -> err
 - renamed event variable e -> evt
 - simplified main 'if' structure of send method

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker: replace EventLogWriteHandler with namedtuple
Ed Bartosh [Mon, 20 Jun 2016 11:00:51 +0000 (14:00 +0300)] 
cooker: replace EventLogWriteHandler with namedtuple

class EventLogWriteHandler is a simple wrapper class with only one
class member. Replacing it with namedtuple makes code less nested and more
readable.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker: don't remove event file
Ed Bartosh [Mon, 20 Jun 2016 11:00:50 +0000 (14:00 +0300)] 
cooker: don't remove event file

There is no need to remove output file as it gets rewritten by
open(self.eventfile, 'w') anyway.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker: encode event objects to base64
Ed Bartosh [Mon, 20 Jun 2016 11:00:49 +0000 (14:00 +0300)] 
cooker: encode event objects to base64

pickle converts python objects into the binary form that can't be
decoded to text and therefore can't be converted to JSON format.

Attempt to convert event objects raises this error:
TypeError:
    b'\x80\x03cbb.runqueue\nrunQueueTaskSkipped\nq\x00)...
    is not JSON serializable

Encoded pickled event objects to base64 to be able to convert data
structure to JSON.

[YOCTO #9803]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker: move EventLogWriteHandler to the top module level
Ed Bartosh [Mon, 20 Jun 2016 11:00:48 +0000 (14:00 +0300)] 
cooker: move EventLogWriteHandler to the top module level

EventLogWriteHandler object was created and used in
BBCooker.initConfigurationData.
This causes creation of multiple EventLogWriteHandler objects
and results in duplicated entries in the output event file
as BBCooker.initConfigurationData is called multiple times.

Added eventlogfile parameter to EventLogWriteHandler to avoid using
global variable DEFAULT_EVENTFILE.
Moved EventLogWriteHandler to the module level.
Created EventLogWriteHandler object in BBCooker.__init__ to ensure that only
one handler object is created.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodepexp.py: port to gtk+3
Jussi Kukkonen [Mon, 20 Jun 2016 12:20:03 +0000 (15:20 +0300)] 
depexp.py: port to gtk+3

The code is still a bit icky (and should be refactored to not use
Gdk.threads_enter/leave) but it should work about as reliably as
it did with Gtk+2.

Based on earlier patches by Maxin and Joshua.

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: remove last css file with bootstrap v2 license
bavery [Thu, 16 Jun 2016 21:14:48 +0000 (14:14 -0700)] 
toaster: remove last css file with bootstrap v2 license

Remove unused css file that still had the bootstrap v2 license in it.

Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunqueue: Use tid instead of taskid in find_chains()
George McCollister [Thu, 16 Jun 2016 20:22:03 +0000 (15:22 -0500)] 
runqueue: Use tid instead of taskid in find_chains()

In 2c88afb6 find_chains()'s taskid argument was renamed to tid but
taskid is still used as key to explored_deps dictionary. Use tid instead
of taskid.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/perforce: Rework to support SRCREV and P4CONFIG
Andrew Bradford [Thu, 9 Jun 2016 13:44:08 +0000 (09:44 -0400)] 
fetch2/perforce: Rework to support SRCREV and P4CONFIG

In recipes which use the perforce fetcher, enable use of SRCREV to
specify any of: ${AUTOREV}, changelist number, p4date, or label.  This
is more in-line with how the other fetchers work for source control
systems.

Allow p4 to use the P4CONFIG env variable to define the server URL,
username, and password if not provided in a recipe.

This does change existing perforce fetcher usage by recipes and will
likely need those recipes which use the perforce fetcher to be updated.
No recipes in oe-core use the perforce fetcher.

References [YOCTO #6303]

Signed-off-by: Andrew Bradford <andrew.bradford@kodakalaris.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2: fix unpacking of deb packages
Stephano Cetola [Fri, 10 Jun 2016 17:56:38 +0000 (10:56 -0700)] 
fetch2: fix unpacking of deb packages

Python 3 changed the return value of check_output to binary rather than
a string. This fix decodes the binary before calling splitlines, which
requires a string.

Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix typo which causes table searches to fail
Elliot Smith [Thu, 16 Jun 2016 14:02:00 +0000 (15:02 +0100)] 
toaster: fix typo which causes table searches to fail

The iterator used to create a search query refers to a
variable "x" which isn't set, causing an "'x' is not defined" error
and preventing table searches (on non-ToasterTables) from working.

Use the "field" variable instead, which contains the name of the
field to add to the query.

[YOCTO #9749]

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>
9 years agobitbake: fix wrong usage of format_exc
Ed Bartosh [Fri, 10 Jun 2016 11:58:17 +0000 (14:58 +0300)] 
bitbake: fix wrong usage of format_exc

First parameter of traceback.format_exc is a 'limit' - a number
of stracktraces to format.

Passing exception object to format_exc is incorrect, but it works in
Python 2 as this code from traceback module works:
    while tb is not None and (limit is None or n < limit):
Comparing integer counter n with the exception object in Python 2
always results in True. However, in Python 3 it throws exception:
    TypeError: unorderable types: int() < <Exception type>()

As format_exc is used in except block of handling another
exception this can cause hard to find and debug bugs.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoparse/ast, event: Ensure we reset registered handlers during parsing
Richard Purdie [Tue, 14 Jun 2016 11:48:37 +0000 (12:48 +0100)] 
parse/ast, event: Ensure we reset registered handlers during parsing

When parsing, we should reset the event handlers we registered when
done. If we don't do this, parse order may change the build, depending
on what the parse handlers do to the metadata.

This issue showed up as a basehash change:

ERROR: Bitbake's cached basehash does not match the one we just generated (
/media/build1/poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb.do_unpack)!

This is due to the eventhandler in nativesdk.bbclass being run, despite
this .bb file not inheriting nativesdk.bbclass. The parse order was
different between the signature generation and the main multithreaded
parse.

Diffsigs showed:

bitbake-diffsigs 1.0-r2.do_unpack.sigbasedata.*
basehash changed from 887d1c25962156cae859c1542e69a8d7 to cb84fcfafe15fc92fb7ab8c6d97014ca
Variable PN value changed from 'nativesdk-buildtools-perl-dummy' to '${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}'

with PN being set by the event handler.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Remove mismerged files
Richard Purdie [Mon, 13 Jun 2016 21:03:54 +0000 (22:03 +0100)] 
toaster: Remove mismerged files

Another patch added migrations in the correct location (different date) so
these in the wrong directory can be removed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotaskdata/runqueue: Rewrite without use of ID indirection
Richard Purdie [Sun, 12 Jun 2016 22:55:48 +0000 (23:55 +0100)] 
taskdata/runqueue: Rewrite without use of ID indirection

I'm not sure what possesed me when I wrote this code originally but its
indirection of everyting to use numeric IDs and position dependent lists
is horrific. Given the way python internals work, its completely and
utterly pointless from  performance perspective. It also makes the code
hard to understand and debug since any numeric ID has to be translated
into something human readable.

The hard part is that the IDs are infectous and spread from taskdata
into runqueue and even partly into cooker for the dependency graph
processing. The only real way to deal with this is to convert everything
to use a more sane data structure.

This patch:
* Uses "<fn>:<taskname>" as the ID for tasks rather than a number
* Changes to dict() based structures rather than position dependent lists
* Drops the build name, runtime name and filename ID indexes

On the most part there shouldn't be user visible changes. Sadly we did
leak datastructures to the setscene verify function which has to be
rewritten. To handle this, the variable name used to specifiy the version
changes from BB_SETSCENE_VERIFY_FUNCTION to BB_SETSCENE_VERIFY_FUNCTION2
allowing multiple versions of bitbake to work with suitably written
metadata. Anyone with custom schedulers may also need to change them.

I believe the benefits in code readability and easier debugging far
outweigh those issues though. It also means we have a saner codebase
to add multiconfig support on top of.

During development, I did have some of the original code coexisting with
the new data stores to allow comparision of the data and check it was
working correcty, particuarly for taskdata. I have also compared
task-depends.dot files before and after the change. There should be no
functionality changes in this patch, its purely a data structure change
and that is visible in the patch.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunqueue: Change buildable/running lists to sets
Richard Purdie [Sun, 12 Jun 2016 22:55:08 +0000 (23:55 +0100)] 
runqueue: Change buildable/running lists to sets

Using positions in lists for flags is an odd choice and makes the code
hard to maintain. Maintaining a list is slow since list searches are
slow (watch bitbake -n slow massively with it) but we can use a set()
instead.

This patch uses python sets to maintain the lists of tasks in each state
and this prepares for changing the task IDs from being integers.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tests browser Fix selenium tests after bootstrap3 breakage
Michael Wood [Mon, 13 Jun 2016 13:32:16 +0000 (14:32 +0100)] 
toaster: tests browser Fix selenium tests after bootstrap3 breakage

Fix a number of selectors which have changed after the port to
bootstrap3. Also fix the modal wait_until_visible and returning of the
text for the radio buttons in the modals for edit custom image and new
custom image on the build dashboard.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: tests Rename test settings to python compliant name and fix import
Michael Wood [Mon, 13 Jun 2016 13:29:30 +0000 (14:29 +0100)] 
toaster: tests Rename test settings to python compliant name and fix import

Use underscore instead of dash in the file name for the test settings.
Also fix the import of the settings module.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: selenium tests Fix all_projects page and sample tests
Michael Wood [Fri, 10 Jun 2016 16:54:37 +0000 (17:54 +0100)] 
toaster: selenium tests Fix all_projects page and sample tests

Fix the selectors after changes made for bootstrap3 and table links being
removed.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: selenium tests Update unique custom image string and fix import
Michael Wood [Fri, 10 Jun 2016 15:48:33 +0000 (16:48 +0100)] 
toaster: selenium tests Update unique custom image string and fix import

- Update the string for recognising a duplicate image recipe
- Fix an incorrect relative import

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: js tests Twitter typeahead library object is now ttTypeahead
Michael Wood [Fri, 10 Jun 2016 15:44:15 +0000 (16:44 +0100)] 
toaster: js tests Twitter typeahead library object is now ttTypeahead

Get the ttTypeahead object on the input to see if it's been initialised
correctly.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: fix wrong usage of print_exc and format_exc
Ed Bartosh [Fri, 10 Jun 2016 09:34:12 +0000 (12:34 +0300)] 
toaster: fix wrong usage of print_exc and format_exc

First parameter of traceback.print_exc and traceback.format_exc APIs is
a 'limit' - a number of stracktraces to print.

Passing exception object to print_exc or format_exc is incorrect, but
it works in Python 2 and causes printing only one line of traceback.

In Python 3 comparison of integer and exception object throws exception:
TypeError: unorderable types: int() < <Exception type>()

As these APIs are usually used in except block of handling another
exception this can cause hard to find and debug bugs.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: changed python version in shebang
Ed Bartosh [Fri, 10 Jun 2016 07:59:44 +0000 (10:59 +0300)] 
toaster: changed python version in shebang

Changed python to python3 in shebang to ensure that
manage.py is always run by python3.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: toastergui tests Use new BeautifulSoup syntax
Michael Wood [Fri, 10 Jun 2016 10:45:48 +0000 (11:45 +0100)] 
toaster: toastergui tests Use new BeautifulSoup syntax

Fix deprecation warning specify the parser used for creating the
BeautifulSoup object.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: open image files in binary mode when sending in response
Elliot Smith [Tue, 7 Jun 2016 15:37:29 +0000 (16:37 +0100)] 
toaster: open image files in binary mode when sending in response

The view code for downloading image files used the "r" flag
to read the file, then used the open file object to form the
HTTP response.

While this worked in Python 2, Python 3 appears to be more strict
about this sort of thing, and Django throws a UnicodeDecodeError
when a file opened this way is used in a response.

Open the file with the "b" flag (binary mode) so that Django can
correctly convert the binary file handle to an HTTP response.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agotoaster-tests: fix tests for latest Selenium version
Elliot Smith [Tue, 7 Jun 2016 15:37:28 +0000 (16:37 +0100)] 
toaster-tests: fix tests for latest Selenium version

Previously, we didn't specify a specific version of Selenium.
When upgrading to Python 3 and installing Selenium to work with it,
the JS unit test broke, as the report format produced by Selenium
had changed.

Modify the test so that it works with the latest Selenium report
format.

Add a note to the README that the given Selenium version should
be used to prevent unexpected test failures.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agotoaster: fix broken reference to urllib
Elliot Smith [Tue, 7 Jun 2016 15:37:27 +0000 (16:37 +0100)] 
toaster: fix broken reference to urllib

The code previously imported urllib to make use of querystring
quoting, but was modified to support Python 3. During this
process, the reference to urllib was not fixed, which resulted
in table filters breaking.

Remove the reference to urllib (which is no longer imported)
and instead reference the imported unquote_plus() function.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agotoaster: fix test_toaster_tables
Ed Bartosh [Tue, 7 Jun 2016 15:37:26 +0000 (16:37 +0100)] 
toaster: fix test_toaster_tables

Removed unneeded code as it causes the following error in Python 3:
    TypeError: expected bytes, bytearray or buffer compatible object

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agotoaster: fix incorrect file mode
Ed Bartosh [Tue, 7 Jun 2016 15:37:25 +0000 (16:37 +0100)] 
toaster: fix incorrect file mode

Python 3 complains about 'wa' mode this way:
 ValueError: must have exactly one of create/read/write/append mode

Fixed by using 'a' mode.

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agotoaster: decode response content
Ed Bartosh [Tue, 7 Jun 2016 15:37:24 +0000 (16:37 +0100)] 
toaster: decode response content

Decoded response content to str to pass it to json.load as it breaks
in Python 3 with this error:
   TypeError: expected bytes, bytearray or buffer compatible object

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agotoaster: fix migrations
Ed Bartosh [Tue, 7 Jun 2016 15:37:23 +0000 (16:37 +0100)] 
toaster: fix migrations

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agotoaster: replace viewkeys() -> keys()
Ed Bartosh [Tue, 7 Jun 2016 15:37:22 +0000 (16:37 +0100)] 
toaster: replace viewkeys() -> keys()

Python 3 doesn't have dict.viewkeys method, renaming
to keys().

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
9 years agotoaster: bin Use python 3 for our django modules check
Michael Wood [Fri, 10 Jun 2016 10:01:10 +0000 (11:01 +0100)] 
toaster: bin Use python 3 for our django modules check

Explicitly use python3 so that the modules for python3 are checked.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: BuildTasksTable filters remove outcome NA option
Belen Barros Pena [Thu, 9 Jun 2016 10:53:20 +0000 (11:53 +0100)] 
toaster: BuildTasksTable filters remove outcome NA option

In the 'outcome' filter for tasks, remove the 'not applicable' option,
since it should not be exposed to users.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: BuiltPackagesTable format empty state in packages table
Belen Barros Pena [Thu, 9 Jun 2016 10:35:11 +0000 (11:35 +0100)] 
toaster: BuiltPackagesTable format empty state in packages table

The explanatory message in the empty state of the packages built table
was missing some spaces.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: build data Fix left navigation
Belen Barros Pena [Wed, 8 Jun 2016 17:00:06 +0000 (18:00 +0100)] 
toaster: build data Fix left navigation

Make sure the current page is always highlighted in the left navigation.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
9 years agotoaster: port all build analysis pages to bootstrap 3
Belen Barros Pena [Thu, 2 Jun 2016 13:26:16 +0000 (14:26 +0100)] 
toaster: port all build analysis pages to bootstrap 3

Port all the pages in the build analysis area to bootstrap version 3.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: buildtables Remove links from non name fields
Belen Barros Pena [Fri, 10 Jun 2016 13:31:29 +0000 (14:31 +0100)] 
toaster: buildtables Remove links from non name fields

Design change to have no links for non-named fields in BuiltPackagesTable.
BuiltRecipesTables and BuildTasksTable.

Additionally:
- Fix class and elements for Bootstrap3 in help text.
- Change title of InstalledPackages table to Packages Included.
- Change which columns are default shown/hidden columns.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: fix typo which prevents filters from working
Elliot Smith [Tue, 7 Jun 2016 15:29:35 +0000 (16:29 +0100)] 
toaster: fix typo which prevents filters from working

'k' was replaced by 'key' at some point but not fixed in the
body of the loop. This caused a failure when the the query
was constructed for a filtered queryset, due to the variable
not being defined.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster-tests: maximize browser window when running UI tests
Elliot Smith [Tue, 26 Apr 2016 16:12:52 +0000 (17:12 +0100)] 
toaster-tests: maximize browser window when running UI tests

In some pages of the UI, the UI tests failed because parts of
the UI which should be visible were being reported as not
visible by the Selenium PhantomJS driver.

On investigation, it turns out that PhantomJS uses a very narrow
default window. This meant that some parts of the UI were being
clipped and were thus not "visible" to the driver, causing test
failures (specifically, on the new custom image page).

Ensure that the window is maximized before running tests to
prevent this happening.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
9 years agotoaster: Rework displaying package dependencies across Toaster
Michael Wood [Thu, 26 May 2016 15:12:27 +0000 (16:12 +0100)] 
toaster: Rework displaying package dependencies across Toaster

After porting the build table to a unified mechanism for showing
dependencies in tables it highlighted that the dependencies selected to
be shown were un-filtered. i.e. all dependencies from all contexts were
shown. The context for a package's dependencies is based on the target
that they were installed onto, or if not installed then a "None" target.

Depending on where the template for the dependencies are show we need to
switch this target which is why a filter and utility function on the
model is added.

Additionally to use the same templates in the build analysis we also
need to optionally add links to the build data for the packages being
displayed as dependencies.

Customising a Custom image recipes may or may not have a target
depending on whether they have been built or not, if not we do a best
effort at getting the dependencies by using the last known target on
that package to get the dependency information.

[YOCTO #9676]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: widgets ToasterTable Catch template rendering exceptions
Michael Wood [Thu, 26 May 2016 15:12:26 +0000 (16:12 +0100)] 
toaster: widgets ToasterTable Catch template rendering exceptions

If a cell template rendering causes an exception catch it and carry on,
this at least allows the table to show the rest of the data if nothing
else. Also improve the error logging so that it's possible what the
offending template snippet was.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: tests Add new build tables to tests
Michael Wood [Thu, 26 May 2016 15:12:25 +0000 (16:12 +0100)] 
toaster: tests Add new build tables to tests

- Add new build tables to be tested
- Add required data into the fixture and clean up a few empty fields
- Fix the SoftwareRecipesTable specific test so as not to rely on two
  particular defined recipes

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: table.js Add the ability to highlight a particular row
Michael Wood [Thu, 26 May 2016 15:12:24 +0000 (16:12 +0100)] 
toaster: table.js Add the ability to highlight a particular row

As in the old build tables it's useful to jump and highlight a
particular row in the table using the #hash in the URL.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: port Installed packages table to ToasterTable
Michael Wood [Thu, 26 May 2016 15:12:23 +0000 (16:12 +0100)] 
toaster: port Installed packages table to ToasterTable

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: port Task tables to ToasterTables widget
Michael Wood [Thu, 26 May 2016 15:12:22 +0000 (16:12 +0100)] 
toaster: port Task tables to ToasterTables widget

Port the Task based tables to ToasterTable. This is the Task, Time, CPU
usage and Disk I/O tables.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: port Built recipes table to toastertables
Michael Wood [Thu, 26 May 2016 15:12:21 +0000 (16:12 +0100)] 
toaster: port Built recipes table to toastertables

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: port table for Built packages to ToasterTable
Michael Wood [Thu, 26 May 2016 15:12:20 +0000 (16:12 +0100)] 
toaster: port table for Built packages to ToasterTable

This is the table that displays all the packages built in the build.
Build -> Packages. Adds a template snippet for the git revision popover.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: ToasterTable widget add an 'a' to Name in Exception class
Michael Wood [Thu, 26 May 2016 15:12:19 +0000 (16:12 +0100)] 
toaster: ToasterTable widget add an 'a' to Name in Exception class

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: toaster tables Enable complex empty states
Belen Barros Pena [Thu, 5 May 2016 14:51:09 +0000 (15:51 +0100)] 
toaster: toaster tables Enable complex empty states

Make sure we can create empty states for toaster tables that include
actions for users to get out of the empty state. Allows a template to be
used as an empty state.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
9 years agotoaster: Migrate project configuration from bootstrap 2 to bootstrap 3
Belen Barros Pena [Tue, 12 Apr 2016 14:56:43 +0000 (15:56 +0100)] 
toaster: Migrate project configuration from bootstrap 2 to bootstrap 3

Convert all the HTML templates, JS and CSS in the project parts of
toaster to use bootstrap 3.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: work-around our lack of a synchronous fetch for typeaheads
Elliot Smith [Mon, 18 Apr 2016 15:59:05 +0000 (16:59 +0100)] 
toaster: work-around our lack of a synchronous fetch for typeaheads

The Twitter typeahead.js library expects the developer to use
a source which does a local search for matching suggestions, then
falls back to a remote search if that doesn't return enough
results.

However, in Toaster, we don't do any caching of the suggestions
for a typeahead, so our source only works in asynchronous mode.

Consequently, we see fewer than the expected number of suggestions
if the typeahead has already shown suggestions matching a query.
For example, searching for "meta-n" in the layers typeahead will
show the results for this query; but when the query changes to
"meta-ne", a new set of results is fetched, which mostly overlaps
with the results for "meta-n". The typeahead assumes that the
overlapping items are locally cached and have been delivered
synchronously, and just appends the new results which don't
overlap with the previous query. But because we don't provide any
results synchronously, we just end up with the single
non-overlapping result in the drop-down.

This can be fixed by hacking typeahead.js so that instead of
appending asynchronous results, we always overwrite and redraw
the whole typeahead menu.

This is a temporary fix, and should be properly fixed (when we
have time), perhaps by using typeahead.js's associated Bloodhound
library.

Added a note about the hack to the license file as an explanation
of why the unminified JS file is included in Toaster.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: migrate typeahead library
Elliot Smith [Tue, 12 Apr 2016 11:07:01 +0000 (12:07 +0100)] 
toaster: migrate typeahead library

Migrate from Bootstrap 2's built-in typeahead to Twitter's
typeahead library.

This is to facilitate moving to Bootstrap 3, which doesn't have
a typeahead.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
9 years agotoaster: tests Add a BuildTest helper class
Michael Wood [Mon, 25 Apr 2016 18:04:56 +0000 (19:04 +0100)] 
toaster: tests Add a BuildTest helper class

Add a helper class for running build tests. Subclass this and call the
build method to get setup for running tests on the resulting data from a
build.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
9 years agotoaster: tweaks to recipe file downloads
Belen Barros Pena [Thu, 28 Apr 2016 12:45:17 +0000 (13:45 +0100)] 
toaster: tweaks to recipe file downloads

* In the custom images table, show the recipe file and download icon
only when the recipe file exists and can be downloaded.

* Also in the custom images table, make sure the download icon tooltip
shows on hover.

* In the custom image details page, show the correct icon (download)
next to the recipe file in the right hand column.

* In the custom image details page, show the recipe file and download
icon in the right hand column only when the recipe file exists and can
be downloaded

* Also in the custom image details page, simplify the help text we show
when the 'download' button is disabled: it gave so much information about
what's actually happening under the hood that it was a bit hard to
follow.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
9 years agotoaster: testsjs Add call back to append elements on completion of tests
Michael Wood [Mon, 4 Apr 2016 10:49:37 +0000 (11:49 +0100)] 
toaster: testsjs Add call back to append elements on completion of tests

When the tests are complete add some marker elements to the test page
DOM which can then looked at for a selenium browser test.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
9 years agocooker.py: fix warn() -> warning()
Robert Yang [Sun, 12 Jun 2016 08:45:00 +0000 (01:45 -0700)] 
cooker.py: fix warn() -> warning()

Fixed:
DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodata_smart/utils: Add 'd' to the context used for better_eval in python expansion
Richard Purdie [Thu, 9 Jun 2016 21:33:33 +0000 (22:33 +0100)] 
data_smart/utils: Add 'd' to the context used for better_eval in python expansion

If a line like:

foo=${@' '.join([d.getVar('D', True) + x for x in (' '.join([d.getVar('FILES_bash-' + p, True) or '' for p in ['lib', 'dev', 'staticdev', 'doc', 'locale', 'ptest']])).split()])}

is added to a function like do_install, it fails with Exception name 'd'
is not defined. This is due to a change of behaviour in python 3 compared
to python 2. Generator expressions, dict comprehensions  and set comprehensions
are executed in a new scope but list comprehensions in python 2.x are not. In
python 3 they all use a new scope.

To allow these kinds of expressions to work, the easiest approach is
to add 'd' to the global context. To do this, an extra optional parameter
is added to better_eval and we use that to add 'd'.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolib/bb/main.py: Fix use of BBPOSTCONF and BBPRECONF
Mariano Lopez [Tue, 7 Jun 2016 12:27:39 +0000 (12:27 +0000)] 
lib/bb/main.py: Fix use of BBPOSTCONF and BBPRECONF

The functionality of BBPOSTCONF and BBPRECONF was added in
commit 21b314d4d1e5b8fbeb4cc57006f0a110f0b3aa8f but there
was a typo in the variable name that raises an exception
in bitbake.

[YOCTO #9235]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocodeparser: Use hashlib for hashing, not hash()
Richard Purdie [Fri, 3 Jun 2016 12:38:33 +0000 (13:38 +0100)] 
codeparser: Use hashlib for hashing, not hash()

"hash() is randomised by default each time you start a new instance of
recent
versions (Python3.3+) to prevent dictionary insertion DOS attacks"

which means we need to use hashlib.md5 to get consistent values for
the codeparser cache under python 3. Prior to this, the codeparser
cache was effectively useless under python3 as shown by performance
regressions.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocodeparser: Small optimisation to stop repeated hash() calls
Richard Purdie [Fri, 3 Jun 2016 12:35:32 +0000 (13:35 +0100)] 
codeparser: Small optimisation to stop repeated hash() calls

No functionality change, just avoids function call overhead in a
function which loops heavily.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2: fix unpacking of deb packages
Paul Eggleton [Wed, 25 May 2016 04:46:44 +0000 (16:46 +1200)] 
fetch2: fix unpacking of deb packages

deb packages in modern Debian versions have the data tarball compressed
with xz rather than gzip, and thus explicitly extracting data.tar.gz
fails. Unfortunately ar doesn't support wildcards matching items to
extract, so we have to find out what the name of the file is first and
then extract it, relying on tar to figure out how to unpack it based on
the filename rather than doing it with pipes and making that
determination ourselves.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agofetch2/git.py: References must match exactly
Peter Kjellerstedt [Mon, 23 May 2016 11:35:49 +0000 (13:35 +0200)] 
fetch2/git.py: References must match exactly

Previously the code used to match a reference to its SHA-1 in
_latest_revision() used the Python "in" operator, which made it match
if the reference matched the beginning of an existing tag or
branch. This test, however, must be exact. I.e., either the reference
matches a tag or branch exactly, or it does not match at all.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocookerdata: print an error if layer dir does not exist
Markus Lehtonen [Thu, 26 May 2016 08:05:43 +0000 (11:05 +0300)] 
cookerdata: print an error if layer dir does not exist

Makes it easier for user to identify problems, e.g. typos, in BBLAYERS.

[YOCTO #9507]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake-layers: show-layers: disable parsing
Paul Eggleton [Mon, 30 May 2016 23:16:58 +0000 (11:16 +1200)] 
bitbake-layers: show-layers: disable parsing

We don't need to parse all recipes just to show the list of layers,
since that comes straight from the configuration, so save a bit of time
by not doing so. (A minor regression that came in with the the
bitbake-layers refactoring).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use python3 explicitly
Ed Bartosh [Mon, 30 May 2016 17:24:52 +0000 (20:24 +0300)] 
toaster: use python3 explicitly

Explicitly used python3 as default python for oe builds
will continue to be python2.

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix urllib imports
Ed Bartosh [Mon, 30 May 2016 13:10:59 +0000 (16:10 +0300)] 
toaster: fix urllib imports

Some functions have been moved from urllib to urllib.parse
in python 3. Modifying the code to import unquote, urlencode and
unquote_plus from urllib.parse if import from urllib fails should
make it working on both python 2 and python 3.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: don't use mru.count in the template
Ed Bartosh [Mon, 30 May 2016 13:04:46 +0000 (16:04 +0300)] 
toaster: don't use mru.count in the template

mru is a list. It has a count method, but it differs from the
one for the queryset. Using mru.count causes 'Latest project builds'
section to silently disappear when toaster runs on python 3.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use // operator instead of /
Ed Bartosh [Mon, 30 May 2016 12:51:20 +0000 (15:51 +0300)] 
toaster: use // operator instead of /

Division operator works differently in Python 3. It results in
float unlike in Python 2, where it results in int.

Explicitly used "floor division" operator instead of 'division'
operator. This should make the code to result in integer under
both pythons.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoRevert "buildinfohelper: work around unicode exceptions"
Ed Bartosh [Mon, 30 May 2016 12:41:53 +0000 (15:41 +0300)] 
Revert "buildinfohelper: work around unicode exceptions"

This commit causes buildinfohelper to crash when run on python 3
as python 3 doesn't have unicode builtin function.

This reverts commit 7a309d964a86f3474eaab7df6d438ed797f935c0.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoxmlrpc: add parameter use_builtin_types
Ed Bartosh [Fri, 13 May 2016 14:01:16 +0000 (17:01 +0300)] 
xmlrpc: add parameter use_builtin_types

Added use_builtin_types parameter to XMLRPCProxyServer.__init__
to fix this error:
    ERROR: Could not connect to server 0.0.0.0:37132
    : __init__() got an unexpected keyword argument 'use_builtin_types'

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use knotty when working with bitbake server
Ed Bartosh [Thu, 12 May 2016 13:32:53 +0000 (16:32 +0300)] 
toaster: use knotty when working with bitbake server

Using empty BITBAKE_UI environment variable causes bitbake server
to fail with the error:
    FATAL: Unable to import extension module "" from bb.ui
           Valid extension modules: knotty or toasterui\n'

Used BITBAKE_UI="knotty" when starting and stoping bitbake
server to solve above issue.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix migrations
Ed Bartosh [Wed, 11 May 2016 10:03:26 +0000 (13:03 +0300)] 
toaster: fix migrations

Created two new migrations due to the models changes made
in python3 patchset.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: moved import bb.server.xmlrpc
Ed Bartosh [Tue, 10 May 2016 14:23:05 +0000 (17:23 +0300)] 
toaster: moved import bb.server.xmlrpc

Moved import xmlrpc module to the place where it's used
to avoid toaster crashes when importing bitbake code.

NOTE: This patch is made to be able to partly test toaster
with bitbake from master. It can be removed as soon as bb.server.xmlrpc
is ported to python 3.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: read timezone files in binary mode
Ed Bartosh [Tue, 10 May 2016 14:18:22 +0000 (17:18 +0300)] 
toaster: read timezone files in binary mode

Used 'rb' mode to open files to avoid unicode error when code
runs on python 3:
   UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80
                       in position 44: invalid start byte

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use re.sub() instead of translate()
Ed Bartosh [Tue, 10 May 2016 14:06:54 +0000 (17:06 +0300)] 
toaster: use re.sub() instead of translate()

translate has different set of parameters in python 3 and
can't be used the way it's used in toaster api module.

Replacing it with re.sub() should make the code work in
both python 2  and python 3.

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: replace map with list comprehensions
Ed Bartosh [Tue, 10 May 2016 13:18:02 +0000 (16:18 +0300)] 
toaster: replace map with list comprehensions

map returns map object in python 3. Replaced calls of
map to equivalent list comprehensions in the code which
requires lists.

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use items and range instead of old APIs
Ed Bartosh [Tue, 10 May 2016 13:13:50 +0000 (16:13 +0300)] 
toaster: use items and range instead of old APIs

Used items() and range() APIs instead of iteritems() and
xrange() as latter don't exist in python 3

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use decode('utf-8') for binary data
Ed Bartosh [Tue, 10 May 2016 12:28:50 +0000 (15:28 +0300)] 
toaster: use decode('utf-8') for binary data

Decoded binary data to utf-8 to fix the following
error when runnign on python 3:
TypeError: Type str doesn't support the buffer API

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: modified list of dependencies
Ed Bartosh [Tue, 10 May 2016 12:24:53 +0000 (15:24 +0300)] 
toaster: modified list of dependencies

Removed dependency to argparse and wsgiref as they're in
standard python library.

wsgiref crashes during installation with python 3 as it's not
compatible with python 3.

Added dependency to pytz as it's used in the toaster code.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix local imports
Ed Bartosh [Tue, 10 May 2016 12:17:26 +0000 (15:17 +0300)] 
toaster: fix local imports

Replaced local imports with absolute imports.
Used .module for local imports.

This should make the code to work on python 2 and python 3.

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix imports to work for python 3
Ed Bartosh [Tue, 10 May 2016 11:35:55 +0000 (14:35 +0300)] 
toaster: fix imports to work for python 3

Some APIs have been moved to other modules in python 3:
 getstatusoutput: moved from commands to subproces
 urlopen: moved from urllib2 to urllib.request
 urlparse: moved from urlparse to urllib.parse

Made the imports work for both python versions by
catching ImportError and importing APIs from different
modules.

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: get rid of using reduce
Ed Bartosh [Tue, 10 May 2016 08:39:04 +0000 (11:39 +0300)] 
toaster: get rid of using reduce

Replaced compicated calls of reduce with more clear code.
As reduce was removed from python 3 this change is mandatory
for the code to work on both pythons.

Here is an example change for illustration purposes:

original code:

  querydict = dict(zip(or_keys, or_values))
  query = reduce(operator.or_, map(lambda x: __get_q_for_val(x, querydict[x]), [k for k in querydict])))

replaced with:

  query = None
  for key, val in zip(or_keys, or_values):
      x = __get_q_for_val(k, val)
      query = query | x if query else x

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use force_text instead of force_bytes
Ed Bartosh [Tue, 10 May 2016 08:04:49 +0000 (11:04 +0300)] 
toaster: use force_text instead of force_bytes

Usage of force_bytes in BuildRequest.__str__ method caused
python 3 to throw "__str__ returned non-string (type bytes)"
error.

Replaced force_bytes with force_text to make the code working
on both python 2 and python 3.

[YOCTO #9584]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agogoggle/image-writer: Drop since bitrotting and no longer used
Richard Purdie [Fri, 13 May 2016 13:11:02 +0000 (14:11 +0100)] 
goggle/image-writer: Drop since bitrotting and no longer used

The upgrade to python3 is the final nail in the coffin for image-writer
and the goggle UI. Neither seem used or recieve patches and are based
on old versions of GTK+ so drop them, and the remaining crumbs support
pieces.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoimage-writer/goggle: Disable pygtkcompat problems
Richard Purdie [Fri, 13 May 2016 11:56:51 +0000 (12:56 +0100)] 
image-writer/goggle: Disable pygtkcompat problems

Disable the problematic gtk usage for use with pygtkcompat. The following
commit removes these tools/UIs entirely but we may as well leave this
piece in the history in case anyone does want a starting point for reusing
them.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agolib/bb: Set required python 3 version to 3.4.0
Jeremy Puhlman [Thu, 12 May 2016 22:32:05 +0000 (15:32 -0700)] 
lib/bb: Set required python 3 version to 3.4.0

get_context was added to mutliprocessing as part of 3.4.0

Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodata_smart: Simplify ExpansionError exception
Richard Purdie [Thu, 12 May 2016 07:22:52 +0000 (08:22 +0100)] 
data_smart: Simplify ExpansionError exception

This seemingly convoluted syntax doesn't work in python3. Instead
use the chained exception handling syntax which appears to make more
sense here.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake: Convert to python 3
Richard Purdie [Thu, 12 May 2016 07:30:35 +0000 (08:30 +0100)] 
bitbake: Convert to python 3

Various misc changes to convert bitbake to python3 which don't warrant
separation into separate commits.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake: Drop futures usage since we're python 3
Richard Purdie [Thu, 12 May 2016 07:22:18 +0000 (08:22 +0100)] 
bitbake: Drop futures usage since we're python 3

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake/pyinotify.py: Upgrade to py3 version
Richard Purdie [Fri, 6 May 2016 08:07:37 +0000 (09:07 +0100)] 
bitbake/pyinotify.py: Upgrade to py3 version

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake/bs4: Upgrade 4.3.2 -> 4.4.1 (python 3 version)
Richard Purdie [Fri, 6 May 2016 08:06:51 +0000 (09:06 +0100)] 
bitbake/bs4: Upgrade 4.3.2 -> 4.4.1 (python 3 version)

Upgrade to 4.4.1 which has been run through 2to3 as per the maintainers
recommendation for v3 use.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoclasses/base.bbclass: Fix missing getVarFlag parameter
Richard Purdie [Tue, 24 May 2016 14:54:38 +0000 (15:54 +0100)] 
classes/base.bbclass: Fix missing getVarFlag parameter

[YOCTO #9603]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker: Fix parse progress for python3
Richard Purdie [Fri, 20 May 2016 11:48:02 +0000 (12:48 +0100)] 
cooker: Fix parse progress for python3

Under python the type conversions can mean there are float values
used for triggering the parse progress events which then fails.
Add an explict int() conversion to ensure the parse events are
generated under python3.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tests builds Add SSTATE_MISS as a valid condition for tc=833
Michael Wood [Thu, 19 May 2016 12:59:33 +0000 (13:59 +0100)] 
toaster: tests builds Add SSTATE_MISS as a valid condition for tc=833

Task.SSTATE_NA and Task.SSTATE_MISS are both valid conditions for the
condition that a Task.OUTCOME_COVERED and Task.OUTCOME_PREBUILT.

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>
9 years agotoaster: tests build Add a test for a build of core-image-minimal
Michael Wood [Thu, 19 May 2016 12:59:32 +0000 (13:59 +0100)] 
toaster: tests build Add a test for a build of core-image-minimal

This is a port of the oe self test to the django test framework from
oe-core meta/lib/oeqa/selftest/_toaster.py

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>
9 years agotoaster: tests Add a BuildTest helper class
Michael Wood [Thu, 19 May 2016 12:59:31 +0000 (13:59 +0100)] 
toaster: tests Add a BuildTest helper class

Add a helper class for running build tests. Subclass this and call the
build method to get setup for running tests on the resulting data from a
build.

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>
9 years agotoaster: Add a specific test settings file
Michael Wood [Thu, 19 May 2016 12:59:30 +0000 (13:59 +0100)] 
toaster: Add a specific test settings file

When running certain tests we want a particular database specified.
When bitbake toaster ui is being tested pass it these test settings so
that it uses the same database as the unit tests running.

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>
9 years agotoaster: runbuilds move the execution sequence out of the poll loop
Michael Wood [Thu, 19 May 2016 12:59:29 +0000 (13:59 +0100)] 
toaster: runbuilds move the execution sequence out of the poll loop

Move the execution sequence for a build out of the polling loop and into
it's own fuction. This means that we can call the function on it's own
if we just want to trigger one build rather than infinite polling.
This is something needed for the build tests.

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>