summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm
Commit message (Collapse)AuthorAgeFilesLines
...
* bitbake: toaster: rename get_query_set -> get_querysetEd Bartosh2015-12-141-4/+4
| | | | | | | | | | | Renamed get_query_set to get_queryset as get_queryset causes deprecation warning in Django 1.7 and is deprecated in Django 1.8 (Bitbake rev: ef8b399dccd413070e32ce05e013337ea01fa64d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Create default project with get_or_create* methodElliot Smith2015-12-141-8/+15
| | | | | | | | | | | | | | | | Rather than maintain data as part of the migrations (as was done for the default project previously), create the default (cli builds) project on demand as a by-product of getting it from the database. [YOCTO #8364] (Bitbake rev: 5fd8e90ab9b81d1bd0d301bc1c91228ecbbea74b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Remove South migrationsEd Bartosh2015-12-1428-8950/+529
| | | | | | | | | | | | | | South has been deprecated in favour of Django's own migration framework, so remove the old South migrations and replace them with Django ones. [YOCTO #8364] (Bitbake rev: 427d8bc02d1aa00a19057602d592d58334514804) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: CustomImageRecipe add search_allowed_fields to this modelMichael Wood2015-12-071-0/+1
| | | | | | | | | | | In order to search the model from the UI some fields must be nominated as searchable. (Bitbake rev: 2558729b4c248a2fa5a11d877bc42cb05a30602e) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Fix get_number_of_builds to count all apart from ↵Michael Wood2015-11-161-5/+4
| | | | | | | | | | | | | IN_PROGRESS The count of a project's builds should not include those which are currently in progress. (Bitbake rev: a981700701c41c7bbb6a9778e95f691278c5c294) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Fix restrictive LogMessage message lengthMichael Wood2015-10-272-1/+346
| | | | | | | | | | | | | | Log messages can be quite long so use a TextField rather than a char field with max length of 240. mySQL is especially picky about field lengths and will cause an exception if the log is too long. [YOCTO #8475] (Bitbake rev: 349119f44cdad240dda7f4db45992e2539e1416f) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Remove Toaster exceptions section of build dashboardElliot Smith2015-10-161-4/+0
| | | | | | | | | | | | | | | | | Fatal build errors were displayed as exceptions, and highlighted with less severity than they deserved. Roll back to treating Toaster exceptions as errors by removing the toaster_exceptions member on Build objects and displaying EXCEPTION events in the errors section on the dashboard. [YOCTO #8320] (Bitbake rev: 59197320bdcefddf06084e871f1b5b21b21cbb63) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Record critical errorsElliot Smith2015-10-161-7/+13
| | | | | | | | | | | | | | | | | | | | Critical errors (where a build failed for reasons of misconfiguration, such as a machine being specified which is not in a project's layers) were being ignored (only log records up to ERROR level were being logged to Toaster's db). This meant that the build would fail but would not correctly report why. Add support for CRITICAL error levels to the LogMessage model, include errors at this level in the errors property for a build, and show errors at this level in the build dashboard. [YOCTO #8320] (Bitbake rev: b6eacbca9cacb607de864ab7d093deb296da8226) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Check whether buildrequest exists before using itElliot Smith2015-10-161-2/+18
| | | | | | | | | | | | | | | | | | | | Builds initiated from the command line don't have a buildrequest associated with them. The build.buildrequest association is only added if a build is triggered from toaster. Some of the code for displaying the status of a build refers to build.buildrequest without checking whether it has been set, which causes an error to be thrown. Add a guard to check whether the buildrequest has been set. [YOCTO #8277] (Bitbake rev: af33409612139ab2347baf6b847b23faea19752d) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: exclude recipes with empty namesEd Bartosh2015-10-121-1/+1
| | | | | | | | | | | | | | Modified get_all_compatible_recipes function to exclude recipes with empty names from the result queryset. This should stop UI to show recipes with empty names in compatible recipes page. [YOCTO #7969] (Bitbake rev: f7c1bd49e2e28d12c6604f5ae54bc96e1e7b6946) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: delete recipe if it can't be savedEd Bartosh2015-10-121-0/+1
| | | | | | | | | | | | | | | | Due to Recipe model constraints some recipes can't be saved. However, they still can create incomplete records in the database. This causes all sorts of errors when Toaster operates with those objects. Removing them should fix those issues. [YOCTO #7969] (Bitbake rev: 4d76a9e418fd98a7882aa29f974a7389f9689314) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: test get_alldeps APIEd Bartosh2015-10-121-1/+19
| | | | | | | | | | Added test case to test Layer_Version.get_alldeps API. (Bitbake rev: 159aa333c2f6344b5b37911c3f09601b9f0df6d8) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix orm testsEd Bartosh2015-10-121-29/+4
| | | | | | | | | | | Cleaned up and fixed orm tests. Removed test_build_layerversion as it's not needed due to changed compatible_layer_versions API. (Bitbake rev: 73ea29ed065bfaa80ee368b2a38c157e36fe1676) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix NameErrorEd Bartosh2015-10-121-1/+1
| | | | | | | | | | Fixed exception: NameError: global name 'DoesNotExist' is not defined (Bitbake rev: eee5311b867d3c8c33e06d04e103bfd3647146f4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: implement API to get full list of depsEd Bartosh2015-10-121-0/+19
| | | | | | | | | | | | | | | | | | Implemented Layer_Version.get_alldeps API to recursively get full list of dependencies for the layer. Dependencies that are already in the project are filtered out from the result. Result list of Layer_Version objects is sorted by layer name for UI to look consistent. This API is going to be used to show amount and list of dependencies for the layer in the list of compatible layers for the project. (Bitbake rev: 7d853a3054a9ae3d18eb6f5bc13ba27d2795c31a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix typo in returning pk list of layer versions in current ↵Michael Wood2015-10-111-1/+1
| | | | | | | | | | | | | project This was accidentally returning the primary key of the ProjectLayer rather than the ProjectLayer.Layer_Version.pk (Bitbake rev: b20f3626148e89af0e9fcfca911a5a1e4e355a41) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Machines filter don't pass self in as parameterMichael Wood2015-10-111-1/+1
| | | | | | | | | | | | Fix typo don't pass self in as a parameter, this evaluated to true giving the wrong results meaning the machines typeahead did not return valid results. (Bitbake rev: 55ba889ef8900c95447861fa3985ca9cfe06afdf) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm remove the complicated querying on the ORMMichael Wood2015-09-291-19/+30
| | | | | | | | | | | | | We no longer need to compute each layer_version and all the recipes which belong to this. [YOCTO #8147] (Bitbake rev: 505979ab931e3a2a218d7030d6064987e8f9ff14) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: buildinfohelper Create a copy of the built layer and recipeMichael Wood2015-09-291-1/+1
| | | | | | | | | | | | | Create a copy of the built layer and the recipes associated with it. This is so that the user can view the historical information about a build. i.e. a snapshot of the layer version and artifacts produced at that build. (Bitbake rev: 0683d9a2b15e3234a94437aaebac84bfcca1420b) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Prioroitise the layer more generic vcs reference over the shaMichael Wood2015-09-291-2/+2
| | | | | | | | | | | | When we do a build we update the last commit value that the layer was built at However in future builds we do want to use the named reference rather than the commit sha, e.g. master/fido (Bitbake rev: a3d47eb923dd2cb5259f387c79549822807eca49) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Create a relationship between build information and ↵Michael Wood2015-09-291-1/+1
| | | | | | | | | | | | | | toaster layers Previously this layer relationship was done by trying to match path information that came back to the buildinfohelper with trying to query for data in toaster's layers table. This rarely matched due to the lose coupling. (Bitbake rev: 838e77c7c3c4006abd1327343a004590ab652de9) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Special case the openembedded-core layer to avoid duplicatesMichael Wood2015-09-291-0/+21
| | | | | | | | | | | | If the openembedded-core layer is specified in the toasterconf we need to treat it differently because we may also get this layer either from the layerindex source or I can also be provided locally. (Bitbake rev: 8e36b6848c14f2708e1f87d12fb533ca0b596c65) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Add CustomImageRecipe modelMichael Wood2015-09-292-1/+385
| | | | | | | | | | | | | | | | | | | This model lists custom image recipes for the project. It is populated when new custom image is created. It holds reference to the base recipe and list of packages included into custom image. For CustomImageRecipes the packages will be copied in and therefore not associated with a build so Remove the requirement for the package to have a Build. co-author: Ed Bartosh <ed.bartosh@linux.intel.com> (Bitbake rev: 33cbf4cd3b4ca47c4901501f5f1eafdfdfdae023) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: make a workaround for old style indexEd Bartosh2015-09-291-0/+2
| | | | | | | | | | | | | | | For a new style indexes 'inherits' field is used to determine if recipe is an image recipe. As old style indexes don't have 'inherits' field this can be guessed from recipe name. Let's consider recipe an image recipe if recipe name contains '-image-'. (Bitbake rev: d769d3f54faaf1a3091b1eb6ed1d17a8a108210a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: store task name in Target objectsEd Bartosh2015-09-231-1/+1
| | | | | | | | | | | | | | | Information about a task is not stored in Target objects. This makes it impossible to correctly operate with the builds where task is specified. Storing taks name is an enabler for other fixes in UI and backend related to restarting builds. (Bitbake rev: 0a69a8a18075c976ed8681d9d75529f8c2f48514) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Improve how default project is identified and fetchedElliot Smith2015-09-033-5/+733
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Command line builds are associated with a "default project" (as we currently require a build to have a project). This acts as a container for builds initiated outside Toaster. Currently, this project is marked as the default by its ID being 0. However, this doesn't work with MySQL, as MySQL won't allow 0 in a foreign key which references an autoincrement field. Instead, use an is_default field to track the default Project for builds initiated outside Toaster. Add a method to fetch this default project, rather than fetching a project with a magic ID. Add this default project in a migration, rather than as a side effect of a get_or_create() style method. Also ensure that builds always have a project explicitly assigned to avoid any magic with a build's project foreign key defaulting to 0 (as it no longer does). [YOCTO #7932] (Bitbake rev: 71b709a1bbc26d89d61873763b467d21e625b274) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Make 0021 migration compatible with MySQLElliot Smith2015-09-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Two issues prevent this migration from working correctly with a MySQL back-end: 1. MySQL won't allow a default value to be set for an AutoField, which is what the migration tries to do for project_id ("ValueError: The database backend does not accept 0 as a value for AutoField.") 2. When migrations are applied to a MySQL back-end, Django (via South) attempts a dry run of the migration first: it applies the forward migration then rolls it back. However, this migration raises an exception on roll back, which causes the whole series of migrations to fail. This commit fixes both issues. [YOCTO #7932] (Bitbake rev: 12f6278d56d7dec57308adc17411802f15d395d7) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Support environments which have proxies setBian Naimeng2015-08-291-29/+7
| | | | | | | | | | | | | | | | | | | | | In an environment with a proxy which requires authentication, e.g. with $http_proxy = 'http://user:password@ip:port', the following error occurs when running Toaster: EE: Using proxy http://user:password@ip:port EE: could not connect to 'url', skipping update: 'error message' This prevents Toaster from fetching layer, recipe and machine information from remote repositories. This patch allows Toaster to use the proxy settings from the environment for HTTP/HTTPS requests. (Bitbake rev: e7a85031fd05a46ef60b380883da4cc372acf89b) Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix pylint errorsAlexandru Damian2015-08-191-1/+1
| | | | | | | | | | | | | | | | | | | | 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>
* bitbake: toaster: do not stop data import on bad dataAlexandru DAMIAN2015-08-191-4/+4
| | | | | | | | | | | | | | | | | | 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>
* bitbake: toaster: use loggers instead of printsAlexandru DAMIAN2015-08-191-9/+13
| | | | | | | | | | | | | | | 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>
* bitbake: toaster: models field initializationAlexandru DAMIAN2015-08-191-17/+21
| | | | | | | | | | | | | | 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>
* bitbake: toaster: improve exception handlingAlexandru DAMIAN2015-08-191-9/+6
| | | | | | | | | | | 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>
* bitbake: toaster: pylint fixesAlexandru DAMIAN2015-08-191-1/+0
| | | | | | | | | | | | 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>
* bitbake: toaster: move code from setup_lv_tests to setUpEd Bartosh2015-08-171-30/+27
| | | | | | | | | | | 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>
* bitbake: toaster: remove ProjectLVSelectionTestCaseEd Bartosh2015-08-171-9/+9
| | | | | | | | | | | | | 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>
* bitbake: toaster: add header to orm/test.pyEd Bartosh2015-08-171-0/+23
| | | | | | | | | | 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>
* bitbake: toaster: simplify testcase codeEd Bartosh2015-08-171-3/+2
| | | | | | | | | | | 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>
* bitbake: toaster: remove duplicated codeEd Bartosh2015-08-171-17/+0
| | | | | | | | | | | 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>
* bitbake: toaster: reuse common codeEd Bartosh2015-08-171-54/+36
| | | | | | | | | | | 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>
* bitbake: toaster: reformat LayerVersionEquivalenceTestCaseEd Bartosh2015-08-171-50/+74
| | | | | | | | | | | | 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>
* bitbake: toaster: rewrite LILSUpdateTestCaseEd Bartosh2015-08-171-13/+17
| | | | | | | | | | 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>
* bitbake: toaster: rewrite test for LayerSource modelEd Bartosh2015-08-171-12/+18
| | | | | | | | | | 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>
* bitbake: toaster: fix test_build_layerversion test caseEd Bartosh2015-08-171-1/+1
| | | | | | | | | | | | | 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>
* bitbake: toaster: remove prints from the test codeEd Bartosh2015-08-171-4/+0
| | | | | | | | | | 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>
* bitbake: toaster: orm Add util functions to return common querysetsMichael Wood2015-08-061-1/+40
| | | | | | | | | | | | We use these querysets when creating tables of results and also when we want to have a typeahead search. These can also form the basis of future API endpoints. (Bitbake rev: 2a10fecd985343802f0e99c6fff25c28980eee20) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Add util function to return the url to layerversionMichael Wood2015-08-061-0/+4
| | | | | | | | | | | Save duplicating this call and make a utility function for it on the Layer_Version object. (Bitbake rev: 32d382315bad37cebbe67ca3287085f3d856a9ed) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: toaster: Add is_image field to the Recipe modelEd Bartosh2015-08-012-0/+341
| | | | | | | | | | | | | | | | | Added new field is_image to the Recipe model. Made sure is_image is populated when layer sources are imported. Made sure the change doesn't break loading old style layer sources. Tested by loading data from layers.pythonanywhere.com and from layers.openembedded.org. [YOCTO: #7571] (Bitbake rev: 3ac0ba73790b8f68567daa2de313c78053411fbb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: continue processing layer dependencies despite errorsBrian Avery2015-07-211-2/+1
| | | | | | | | | | | | | | Sometimes, a layer dependency will not exist, or not exist for a particualr branch. In this case we need to continue processing and hope for the best. [YOCTO #7955] (Bitbake rev: 2961bf2612fce111a7be6cef285595a075200780) Signed-off-by: Brian Avery <brian.avery@intel.com> Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Partial Revert "fixes after html5 compliance testing"Michael Wood2015-07-021-3/+2
| | | | | | | | | | | | Partial revert of bb commit 7aecb974d44d9bc711ffba5cc65e770811397fba There were changes in this commit which broke the compatible layers mechanism meaning that no layers, recipes or machines were showing. (Bitbake rev: 124157b567469639c6c839233f42049a093ba083) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>