summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/tests.py
Commit message (Collapse)AuthorAgeFilesLines
* 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: 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: orm: Fix all failing unit testMichael Wood2015-05-291-12/+20
| | | | | | | | | | | This fixes all the unit tests for the orm. Also added is the ability to set a custom Layer index if you want to avoid using the public one by specifying TTS_LAYER_INDEX (Bitbake rev: dfbcbe116d0b987b850f67056f02f489ac0b8360) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: improvements in layer selection logicAlexandru DAMIAN2015-02-101-1/+130
| | | | | | | | | | | | | | | | This patch clearers and bring fixes for the layer selection logic in order to enable information collected during build to be used in configuring projects, specifically targeting the recipes learned through the building process. The patch also adds tests to verify the layer selection logic. [YOCTO #7189] (Bitbake rev: f0faba8ef0f08c98ac4bddf5b3954d540820d215) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: layer name correlationAlexandru DAMIAN2014-11-211-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies how layers are identified and matched. Layers were primarely organized by the source of layer information, and Releases were separated by both layer git branches and originating source of layer information. This setup prevented mixing layers from different sources for a certain release, which didn't match the way people use Yocto Project / bitbake. This patch brings name-based indentification, where layers with the same name are assumed to be equivalent, in the sense of being able to substitute one another. To facilitate this identification to humans, layers are differentiated by GIT URI instead of layer sources, which was a rather arbitrary abstraction. Additional changes include modification to models in order accomodate for the new data structure, and to config file loading to match the new toasterconf.json layout. (Bitbake rev: 4357200aed522ad56cfd84917f877645b83b6a70) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update orm models for layerindex compatibilityAlexandru DAMIAN2014-08-291-0/+33
We add a ToasterSettings table that will keep installation-wide settings. We update the models for the layer-related data storage to make them compatible with the layerindex application API. We add a LayerSource class that can update local data from a LayerIndex-like compatible API. Adding a command line option to perform information update from all upstream layer sources. Fair warning - there is no backward migration from 0013. (Bitbake rev: 89e13579e1b44b738f10fadec8454aa0e6f073af) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>