summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core/decorator
Commit message (Collapse)AuthorAgeFilesLines
* oeqa/core/decorator: Fix super class modifying subclass tagsNathan Rossi2019-09-071-1/+2
| | | | | | | (From OE-Core rev: ba35bead1108c7d8480b785b2e59f40ea77b5549) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core: Rework OETestTag and remove unused OETestFilterNathan Rossi2019-09-072-35/+12
| | | | | | | | | | | | | | | | | | | | | | Rework OETestTag so that it does not rely on the existing decorator code base and instead inserts the tags into an attribute on the decorated target (e.g. class/type or method). This allows the use of OETestTag on classes and method. In order to filter tagged tests rework the loaders filtering code, removing the generic-ness (with validation and attributes/etc.) and replace it with a "tags_filter" parameter which is a function that filters a test based on the tags it has. This allows the loader user to filter on tags in more specific ways (e.g. include all untagged tests and any tests tagged with foo). Plumb all this through the context code and testing code. Update the associated tests to pass correctly with the changes. (From OE-Core rev: b8a4a4c2de68110d74607cb9807c9e741ca9441c) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib+scripts: Convert to SPDX license headersRichard Purdie2019-05-095-5/+20
| | | | | | | | | | | | | | | | | | | | | | | This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Drop OETestIDRichard Purdie2019-05-091-23/+0
| | | | | | | | | | These IDs refer to testopia which we're no longer using. We would now use the test names to definitively reference tests and the IDs can be dropped, along with their supporting code. (From OE-Core rev: 8e2d0575e4e7036b5f60e632f377a8ab2b96ead8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator: add skipIfInDataVarRichard Leitner2018-08-231-0/+14
| | | | | | | | | skipIfInDataVar will skip a test if a value is in a certain variable. (From OE-Core rev: 10b935c713748346aea6c36c2f41e0ae6c320821) Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/decorator: Improve reliabilityRichard Purdie2018-07-181-7/+9
| | | | | | | | | | | | Checking if the dependency had any failure is unreliable, for example if the underlying data doesn't get transferred and the list is empty, success of the dependency is assumed. Since we now have success data available, change the code to use it. (From OE-Core rev: 4abba4c30d5a6163a968a119395a679e5e281ab4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runner: Simplify codeRichard Purdie2018-07-181-3/+1
| | | | | | | | | There doesn't appear to be any reason we need this _results indirection any more so remove it. (From OE-Core rev: b618261811c48ff3b98eab1b340a8cd09ef183c6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/threaded: Remove in favour of using concurrenttestsRichard Purdie2018-07-182-36/+11
| | | | | | | | | | | | | | | | | | | | | | | | | We have several options for parallel processing in oeqa, parallel execution of modules, threading and mulitple processes for the runners. After much experimentation is appears the most scalable and least invasive approach is multiple processes using concurrenttestsuite from testtools. This means we can drop the current threading code which is only used by the sdk test execution. oeqa/decorator/depends: Remove threading code Revert "oeqa/sdk: Enable usage of OEQA thread mode" This reverts commit adc434c0636b7dea2ef70c8d2c8e61cdb5c703b1. Revert "oeqa/core/tests: Add tests of OEQA Threaded mode" This reverts commit a4eef558c9933eb32413b61ff80a11b999951b40. Revert "oeqa/core/decorator/oetimeout: Add support for OEQA threaded mode" This reverts commit d3d4ba902dee8b19fa1054330cffdf73f9b81fe7. (From OE-Core rev: a98ab5e560e73b6988512fbae5cefe9e42ceed53) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator/data.py: fix skipIfNotInDataVarChen Qi2018-06-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | The var might not be set, resulting in unexpected error. RESULTS - multilib.MultilibTest.test_check_multilib_libc - Testcase 1593: ERROR The above error is due to MULTILIBS being not set, which is the default for OE. This patch fixes this problem. Also, the debugging message in skipIfNotInDataVar is currently confusing. Instead of DEBUG: Checking if 'MULTILIBS' value is in 'multilib:lib32' to run the test it should be DEBUG: Checking if 'MULTILIBS' value contains 'multilib:lib32' to run the test This patch also fixes it. (From OE-Core rev: 3f5c678664a2bba43d99508779dc2ce227cf52a2) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator/__init__.py: use 'cls' instead of 'obj'Chen Qi2018-06-041-3/+3
| | | | | | | | | | Use 'cls' instead of 'obj' to better reflect that registerDecorator actually serves as a class decorator. (From OE-Core rev: e06e4c859e8be5225d80806a2ebe175f0b152fe1) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator/__init__.py: set metaclass to ABCMetaChen Qi2018-06-041-2/+2
| | | | | | | | | | | | | | | | | | OETestFilter is a subclass of OETestDecorator. It wants to make use of @abstractmethod decorator. But such decorator requires metaclass to be ABCMeta to have effect. So add it now to achieve the designed behaviour. Comments from python's manual: """ Using this decorator requires that the class's metaclass is ABCMeta or is derived from it. """ (From OE-Core rev: 28c4fafb2322ea8c37bcd7710f22f46ef552a902) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator/oetimeout: Add support for OEQA threaded modeAníbal Limón2017-06-021-10/+30
| | | | | | | | | | | | | | | | | In python signals are only allowed to delivery into the main thread, to support the threading mode test if the runner is threaded and use threading.Timer instead. There are some considerations like SIGALRM interrupts the execution after N seconds but the Timer only starts a Thread to notice the timeout and the exception will be raised when the test run ends. [YOCTO #11450] (From OE-Core rev: 8ab201612e22493dc2509ba339a8f07ade611a54) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator/depends: Add support for threading modeAníbal Limón2017-06-021-1/+7
| | | | | | | | | | | | The _skipTestDependency needs to know if the thread mode is enabled because the _results are by thread. [YOCTO #11450] (From OE-Core rev: 257d9ef4531052ba8507771b58884c7d2b64143d) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator: Add skipIfNotDataVar and skipIfNotInDataVarMariano Lopez2017-01-231-1/+35
| | | | | | | | | | | skipIfNotDataVar will skip a test if a variable doesn't have certain value. skipIfNotInDataVar will skip a test if a value is not in a certain variable. (From OE-Core rev: a81045f4e2b740173237f5ae4e80e2bc0b287faa) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator/data.py: Add skipIfNotFeature decoratorMariano Lopez2017-01-231-0/+28
| | | | | | | | | | | | This adds a new decorator to check if image under tests has certain DISTRO_FEATURE or IMAGE_FEATURE. [YOCTO #10234] (From OE-Core rev: 8740803d0696a0e97b72210a56f4fbd3135826ed) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator: Add support for OETestDataDepends and skipIfDataVarAníbal Limón2017-01-231-0/+36
| | | | | | | | | | | | | | The OETestDataDepends decorator skips a test case if a variable isn't into test data (d). The skipIfDataVar decorator skips a test case if a variable has certain value. (From OE-Core rev: 7dc519d20e835ee7693c31903e164c4bc0e5e598) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator: Add support for OETimeout decoratorMariano Lopez2017-01-231-0/+25
| | | | | | | | | | | | | | The OETimeout provides support for specify certain timeout in seconds for a test case, if the timeout is reach the SIGALRM is sent and an exception is raised to notify the timeout. [YOCTO #10235] (From OE-Core rev: 1bf66a370361912e9950d7ff45e382c93622a169) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator: Add support for OETestID and OETestTagMariano Lopez2017-01-232-0/+47
| | | | | | | | | | | | | These two decorators stores certain TAG or ID for the test case also provides support for filtering in loading step. [YOCTO #10236] (From OE-Core rev: 047af4ce864bbf98e2617b348ae9ccb77ac52871) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/decorator: Add support for OETestDependsAníbal Limón2017-01-231-0/+94
| | | | | | | | | | | | | | | | | | The OETestDepends decorator could be used over test cases to define some dependency between them. At loading time sorting the tests to grauntee that a test case executes before also raise an exception if found a circular dependency between test cases. At before test case run reviews if the dependency if meet, in the case of don't it skips the test case run. (From OE-Core rev: 2385bd3c8a7c012fd1cad5465ec7d34675552c75) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core: Add loader, context and decorator modulesAníbal Limón2017-01-231-0/+71
loader: Implements OETestLoader handling OETestDecorator and filtering support when load tests. The OETestLoader is responsible to set custom methods, attrs of the OEQA frameowork. [YOCTO #10231] [YOCTO #10317] [YOCTO #10353] decorator: Add base class OETestDecorator to provide a common way to define decorators to be used over OETestCase's, every decorator has a method to be called when loading tests and before test execution starts. Special decorators could be implemented for filter tests on loading phase. context: Provides HIGH level API for loadTests and runTests of certain test component (i.e. runtime, sdk, selftest). [YOCTO #10230] (From OE-Core rev: 275ef03b77ef5f23b75cb01c55206d1ab0261342) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>