Commit Graph

3891 Commits

Author SHA1 Message Date
Alexandru DAMIAN 6f176d4c7b bitbake: toastergui: fix projectbuilds page
This patch fixes the redirection projectbuilds page and
the template layout in the projectbuilds page.

* The _build_list_helper now returns an empty RedirectException
that is properly customized by the caller and re-raised
to achieve redirection to the original page (poor man's overloading)

* The template for ProjectBuilds is updated as to properly display
Build objects instead of BuildRequest objects.

[YOCTO #7995]

(Bitbake rev: 5982b5df9288a5773c7314234e2e0432f85678f2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:56 +01:00
Alexandru DAMIAN ab13498eb9 bitbake: toastergui: do not show in-progress builds in the table
This patch fixes the all-builds table as not to show
in-progress builds.

(Bitbake rev: 60fdc834d386dbace0a158123afd68df3ffbff90)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:56 +01:00
Alexandru DAMIAN 25d4a35b03 bitbake: toaster logger: fix pylint issues
This patch fixes pylint issues in the toaster build data logger,
toasterui. The following types of warnings are touched here:

* fixing imports
* unused variables are set to _
* logger calls now use lazy evaluation instead of formatting
the string
* correct whitespace identation
* removes unneeded "pass" statements, and extra parantheses
* disable specific pylint warnings when decideing to override
them

(Bitbake rev: 947d47f15048baa967f88e03d80014e88ce152aa)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:55 +01:00
Alexandru Damian c9455a7484 bitbake: toaster: fix pylint errors
Prompted by issues discovered during running pylint on
the toaster sources, this patch fixes:

* missing import in toaster ui
* improper call of function in toaster ui (logger.debug)
* improper function definitions in bbcontroller
* invalid references to objects in bldcontrol.models
* proper initialization of object fields in ToasterTables

Also inhibiting specific pylint errors in files where
the problems are mis-identified.

(Bitbake rev: 1c71955c416fb68455f7f70669aba4202c411807)

Signed-off-by: Alexandru Damian <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:55 +01:00
Alexandru DAMIAN 07b58c9734 bitbake: toaster: fix updates on failed build requests
The patch to fix the original mistake is wrong, in the sense
that a constant from the BuildRequest class is used on the build
object.

Fixing the patch to bring in the correct constant in.

(Bitbake rev: a740c17efc0ccc9f89a428ead08f9739af3c6de4)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:54 +01:00
Alexandru DAMIAN 242603e9b4 bitbake: toaster: replace raising Exceptions in loadconf
This patch replaces throwing Exceptions in toaster loadconf
command with proper explicit error messages. This allows
the user to properly understand and debug what went wrong when
loading a config file.

Additionally we change a bit the logic around auto-detecting relative
giturl handling so the user gets proper error messages when
trying to load an invalid toasterconf.json file.

[YOCTO #7945]

(Bitbake rev: 3d14cc033a855bf5b20e799438548b6d8f29d9b8)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:54 +01:00
Alexandru DAMIAN c159b3c117 bitbake: toaster: do not stop data import on bad data
The layer data update in Layer source needlessly stops
processing by throwing an Exception when bad layer data cannot
be inserted in the database (e.g. invalid dependencies).

This patch changes the behaviour to ignore bad data, and
continue with data import after detailed logging through the
logging system.

[YOCTO #7955]

(Bitbake rev: e0911e408db4fa07086738fe11121b173b4d1cf5)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:54 +01:00
Alexandru DAMIAN be4636aef2 bitbake: toastergui: rename variables in views.py
Renaming various variables in the views.py file to make
the code more readable, and prevent overshadowing of global
variables with local variables that have a different name.

(Bitbake rev: 5fe0c42ca9d34fa34b65b9fe0ff474200b78efe6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:53 +01:00
Alexandru DAMIAN 12c9cca5b1 bitbake: toaster: use loggers instead of prints
Switching debugging from using print statement to using
loggers, as it uses the logging infrastructure to process
the messages.

The messages are logged with the "toaster" logger which
is defined in the toastermain/settings.py.

(Bitbake rev: adf3bdcbe8b0b0bbe9de2800f2d20a53e8d88543)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:53 +01:00
Alexandru DAMIAN d18e6303a0 bitbake: toaster: models field initialization
As prompted by pylint, the object fields need to be
initialized properly, so this patch fixes that.

Also adds some casts to int, because, sometimes, the IntegerField
is not returning an int, but a string.

(Bitbake rev: cc9ac01d0726203fbe916cec51cc464eaeae9305)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:53 +01:00
Alexandru DAMIAN 504396f6a3 bitbake: toaster: improve exception handling
This patch improves exception handling, fixing issues
as prompted by pylint, including exception renaming.

(Bitbake rev: 652fad64864703cb1bbeede8d5bfc4208974be68)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:52 +01:00
Alexandru DAMIAN 99730d64d4 bitbake: toaster: checksettings: fix TEMPLATECONF detection
Improving the TEMPLATECONF detection by verifying the return
code and dumping extra debug information in case of exception.

(Bitbake rev: bdc00755993aa37e7669c3859ef4ea9b1fc3e680)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:52 +01:00
Alexandru DAMIAN 3a1af07177 bitbake: toaster: checksettings: fix guesspath initialization
Object fields need to be instantiated in the constructor.
Fixed prompted by pylint.

(Bitbake rev: 40db75c6117c3226c27d278d2acf0cd3ba61a167)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:51 +01:00
Alexandru DAMIAN 98dfa27050 bitbake: toaster: pylint fixes
This patch fixes imports, default parameters to functions,
incorrect overloading and exception handling issues
highlighted by pylint. There are no functional changes.

(Bitbake rev: 066e096b80dcb0e93e1a088acf5d914184361769)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:51 +01:00
Mihail Stanciu c8df84777b bitbake: toasteruitest: Updated UI tests cases to use dom IDs and 1.9 UI changes
Updated existing tests to use dom IDs where necessary.
Updated tests to use 1.9 specific UI changes:
    - removed deprecated columns(log and layer directory)
    - changed expected names for table header("Recipe" instead of "Target")
Added tests for TC 942 and 943 which were missing
Removed test for TC 959 which was deprecated under 1.9

(Bitbake rev: d8c37780609571e95edef9a220225927eb94b174)

Signed-off-by: Mihail Stanciu <stanciux.mihail@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:51 +01:00
Michael Wood 55f13d4556 bitbake: toastergui: Call csrf function in all pages to ensure cookie is sent
Not all pages call the csrf token template function so django does not
bother to send the cookike, this meant that all subsequent ajax calls
fail. So add this to the base template.

[YOCTO #8175]

(Bitbake rev: baed115081f888e027f92f37e12dc2dd2b874bf0)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:50 +01:00
Paul Eggleton ae7d04832b bitbake: bitbake-layers: show-recipes: allow filtering by class inheritance
Add a -i/--inherits option to filter the output to include only recipes
inheriting the specified class(es).

Implements [YOCTO #7475].

(Bitbake rev: e4ec622d9dc5f882049f5e8027331ec1e17681de)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:50 +01:00
Paul Eggleton a3967e2ba5 bitbake: bitbake-layers: fix mapping files to layers
bitbake-layers needs to map recipe and class files to the layer they
came from within the show-recipes and show-overlayed commands. However,
it turns out that mapping a file to the layer it came from is not as
trivial as it might seem. To do it properly we need to match the path to
an entry in BBFILES then map that to the collection name using
BBFILE_PATTERN, then map that to the actual layer using variable
history. If it doesn't match any entry in BBFILES, then we can fall back
to BBFILE_PATTERN (to handle classes and conf files).

This fixes the layer name not showing up properly in the output of the
show-recipes and show-overlayed commands for recipes in layers such as
meta-intel that have subdirectories in BBFILE_PATTERN. It also fixes the
priority not showing up in show-layers for such layers.

As part of this I've added a function to VariableHistory which for a
space-separated list variable gives you a dict mapping the items added
to the files in which they were added. I've also fixed
bb.utils.get_file_layer() and reduced some of the duplication by using
this function in bitbake-layers. Also fixes the priority not showing up
for layers such as meta-intel

Fixes [YOCTO #8160].

(Bitbake rev: e852f6cabd7489585477ab567a1afeb2252377ac)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:49 +01:00
Paul Eggleton 22e8c6cbd3 bitbake: bitbake-layers: remove-layer: accept just layer directory
If the specified layer isn't a path, then just match on the directory.

Fixes [YOCTO #7839].

(Bitbake rev: b4c45bf6c42b4d319ba868f4ce77e86c8b585818)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:49 +01:00
Paul Eggleton c4989e7bf3 bitbake: bitbake-layers: ensure we exit if BBLAYERS_LAYERINDEX_URL is not set
We were printing an error here, but not exiting.

(Bitbake rev: ddcaf8950a0b1cc74806e1ad7b49a1de0ea0d2b1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:49 +01:00
Paul Eggleton 5807ab3266 bitbake: lib/bb/main: consolidate UI/server extension listing and loading
Provide us with a means of showing the list of UIs / server choices for
the command line help, and do the processing in one place for both.

(Bitbake rev: 24035c1daad5a904c3372d21d44191ee8182338f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:48 +01:00
Paul Eggleton 9b05ef581c bitbake: lib/bb/parse: properly handle OSError when updating mtime cache
If a file no longer exists, drop it from the cache silently instead of
generating a traceback. This was visible in some cases when a recipe was
deleted when bitbake was resident in memory.

(Bitbake rev: fe105b9042bdac4afd9f38fcf92bfdc2c04ec23f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:48 +01:00
Paul Eggleton 97067755b9 bitbake: bitbake-layers: use "with open" consistently
It's best practice to use "with open..." rather than open & close where
practical.

(Bitbake rev: 1ef38549cae5639f2c8bcc2b270c5c82a5e29e3c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:47 +01:00
Paul Eggleton 90d97f7a57 bitbake: bitbake-layers: refactor show-appends to stop using cooker bbappends list
(Bitbake rev: 60a253555a3ebadea775cfdc3331cba78ee3e71b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:47 +01:00
Richard Purdie 67a6a4d6c0 bitbake: bitbake-layers: Convert flatten to use collections.bbappends
flatten support currently looks broken since it doesn't appear to
deal with handling "%" support in bbappend file names.

This patch converts it to use collections.get_file_appends() which
correctly handles "%" support.

(Bitbake rev: 0448714c52bc1e9584a5282cffdcaa404fb0618a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:47 +01:00
Paul Eggleton 3c3ff92882 bitbake: cooker: drop appendlist
Now we have the bbappends list and all users have been converted over to
use it, we don't need this anymore.

(Bitbake rev: 279770c42d4c63aa2cebce331b55a92a564b50ac)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:46 +01:00
Paul Eggleton b84bf58c19 bitbake: cooker: drop appliedappendlist
Whilst collecting this list on the fly may be quicker, doing so within a
function that's meant to *query* the list of bbappends is poor practice.

(Bitbake rev: 5c12aa3b0010d7d1733e54a0ca7d0af465454210)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:46 +01:00
Paul Eggleton e2ddc18874 bitbake: Fix -m handling if cannot connect to server
If we can't connect to the server we should error out, because it might
not be that the server is actually dead - it might just be unable to
execute commands.

(Bitbake rev: d4b921676859d6ba4e1922fa4682ee941652f483)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:46 +01:00
Paul Eggleton 7ce27b9fce bitbake: cooker: ensure prefile/postfile can work in memory resident mode
The prefile/postfile options weren't working in memory resident mode
because they weren't being passed through to the server, so ensure that
they do get passed through and that the server is reset when the values
come through.

(Bitbake rev: a3f7dc042fc7b1c308bfd248431930eb8ba50326)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:45 +01:00
Richard Purdie 37a2c062a5 bitbake: command: ensure sync commands that read configuration see updates
Add a means of ensuring that synchronous commands that read the results
of the configuration trigger a reparse of the configuration if any
underlying files have changed.

(Bitbake rev: aaf3cc024315450c1674819edf2a4e5cdf293f35)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:45 +01:00
Paul Eggleton 6e5ac6ba8e bitbake: cooker: further limit inotify watches
Unfortunately we were acting on inotify notifications about any files
changing within the watched directories, not just the ones we actually
care about. In OE the build directory is in BBPATH and hence it gets
watched, and we write things like bitbake.lock and
bitbake-cookerdaemon.log to that directory, hence effectively
notifications were being tripped on every bitbake invocation. To avoid
this, record which file/subdirectory we're interested in against each
watched directory so we can ignore any events for files/subdirectories
we don't care about.

Additionally, if we move up to the parent dir, ensure we haven't already
seen it before adding a watch on it (we were previously calling
watcher.add_watch() on the same directory multiple times before in a
typical OE configuration).

(Bitbake rev: bc39b8da34c046b629c43fd0a8cac2efbf1c060f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:44 +01:00
Paul Eggleton e0daf78408 bitbake: command: intercept SystemExit to avoid trashing the server
If sys.exit() is called within a command run over XMLRPC, the XMLRPC
server is effectively trashed (apparently listening but no longer able
to respond to commands). We need to intercept the SystemExit exception
and deal with it as we would any other exception.

(Bitbake rev: 95e391acbc3b4efd6c77637a1ce815012ae0f09b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:44 +01:00
Paul Eggleton 715d857174 bitbake: Fix default function parameter assignment to a list
With python you should not assign a list as the default value of a
function parameter - because a list is mutable, the result will be that
the first time a value is passed it will actually modify the default.
Reference:

http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments

(Bitbake rev: 7859f7388f2e3f675d0e1527cfde18625f36f637)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:44 +01:00
Ed Bartosh c348fa5018 bitbake: toaster: move code from setup_lv_tests to setUp
As ProjectLVSelectionTestCase was removed there is no point
to keep this function. Moved code back to setUp method.

(Bitbake rev: 8e9bd559c8ef0ebc9e8babbada06e710908bae08)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:45 +01:00
Ed Bartosh e5956a6b85 bitbake: toaster: remove ProjectLVSelectionTestCase
Moved code from ProjectLVSelectionTestCase.test_single_layersource to
LayerVersionEquivalenceTestCase.test_compatible_layerversions.

Removed ProjectLVSelectionTestCase.

(Bitbake rev: b322cb6f5fec0b979a646605ed0d7646764c07a7)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:44 +01:00
Ed Bartosh 5638321f03 bitbake: toaster: add header to orm/test.py
Added header and module docstring.

(Bitbake rev: f393d3b8943375d18ebd6bc5e00dec5f288b46ec)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:44 +01:00
Ed Bartosh 50f9e203bb bitbake: toaster: simplify testcase code
Replaced 2 asserts with one in test_single_layersource method
of ProjectLVSelectionTestCase.

(Bitbake rev: 54131366ac2a8fc7866fb1293f5cd0e3da13ea46)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:43 +01:00
Ed Bartosh 552b1feeef bitbake: toaster: remove duplicated code
Removed test_dual_layersource method from ProjectLVSelectionTestCase
as identical method presents in LayerVersionEquivalenceTestCase.

(Bitbake rev: 5611c6b911e8a638f462e80e924ac9265a2199f5)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:43 +01:00
Ed Bartosh 1f7d7bf216 bitbake: toaster: reuse common code
Moved setup code of LayerVersion tests to a function
and call it from setUp methods of 2 classes.

(Bitbake rev: 65121e71078499ba585cc6a42018339d7884322e)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:43 +01:00
Ed Bartosh 958696f560 bitbake: toaster: reformat LayerVersionEquivalenceTestCase
Reformatted to increase readability and satisfy pylint.
Added docstings.
Shortened variable names.

(Bitbake rev: 01e6fb74b60b1a66873f33866a35bdf6b2f807bd)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:42 +01:00
Ed Bartosh d637b91639 bitbake: toaster: rewrite LILSUpdateTestCase
Reformatted code. Added docstings.

(Bitbake rev: 0d1a9038b0cface75d3c858543e411f519b4ef5e)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:42 +01:00
Ed Bartosh 344ad2e128 bitbake: toaster: rewrite test for LayerSource model
Rewritten LayerSourceVerifyInheritanceSaveLoad class from scratch.

(Bitbake rev: 34ea4c661ee48e1986fe2375b94e5b1c5c16c8ee)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:41 +01:00
Ed Bartosh 11668e24e7 bitbake: toaster: fix test_build_layerversion test case
The reason of test failure is that Django querysets are
different even if they contain the same objects.

Fixed by converting querysets into lists.

(Bitbake rev: c1abc6f0905e4321668a483a3d5be7cef3c25401)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:41 +01:00
Ed Bartosh 77ca551813 bitbake: toaster: remove prints from the test code
Removed prints as they make test output harder to understand.

(Bitbake rev: 922d37bfee7cc75aa7a3fd5b76abc33df57d3704)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 14:41:40 +01:00
Mihail Stanciu 645435a645 bitbake: toastergui: Added IDs to elements used in testing
Added static IDs to elements commonly used in the testing process so
that future UI modifications would not break tests as easily.

[YOCTO #7380]

(Bitbake rev: 04e896d7fb170271fb09dae5c2a42acb4b68f513)

Signed-off-by: Mihail Stanciu <stanciux.mihail@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 08:48:28 +01:00
Sujith H 91d8f88bb7 bitbake: toastergui: Add tests for xhr_importlayer
Inorder to make sure if layer name which we import is already
available in toaster database, a test case has been included.
This would help user to identify if layer name which has been
provided in the import layer web page already exists or not.

(Bitbake rev: 26e2b4a997503b82dc5535ce087565a0d6418141)

Signed-off-by: Sujith Haridasan <sujith.h@gmail.com>
Signed-off-by: Sujith Haridasan <Sujith_Haridasan@mentor.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 08:48:28 +01:00
Alexandru DAMIAN c9d1cb299a bitbake: toaster: fix invalid fields in the package details page
This patch safeguards referencing invalid fields in the
project details template, and fixes errors thrown in the
page.

[YOCTO #7992]

(Bitbake rev: 64b30bc15e87f81eddac79872b2282c435827ad0)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 08:48:27 +01:00
Belen Barros Pena 8ab2101166 bitbake: toaster: Fix typo in set up script output
Removing an spurious 'it' when setting the build directory.
Thanks to Scott Rifenbark for finding the typo!

(Bitbake rev: dd644a2c87e651c3990520759bab55a56ba110d1)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 08:48:27 +01:00
Ed Bartosh a16e0b4014 bitbake: toaster: reduced amount of instance attributes
Used local variables instead of instance attributes in ViewTests.setUp

Fixed pylint warning:
    Too many instance attributes (9/7) (too-many-instance-attributes)

(Bitbake rev: 0c419902e5f58dcee9b7fbe9af1928da37e18399)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:58:02 -07:00
Ed Bartosh 5fe1c19644 bitbake: toaster: fix pylint warning 'no space allowed'
Fixed pylint warning "No space allowed before/after bracket".

(Bitbake rev: 0b0f360b3660373716189995f3d33ffbc1b21db5)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-10 13:58:02 -07:00