aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/decorators.py
AgeCommit message (Collapse)Author
2014-12-25oeqa/utils: fix testcase decorator to allow calling tests individuallyPaul Eggleton
Without this, running tests individually failed with a traceback: $ oe-selftest --run-test buildoptions.ImageOptionsTests.test_incremental_image_generation 2014-12-23 14:40:37,636 - selftest - INFO - Checking that everything is in order before running the tests 2014-12-23 14:40:38,408 - selftest - INFO - Running bitbake -p 2014-12-23 14:40:40,235 - selftest - INFO - Loading tests from: oeqa.selftest.buildoptions.ImageOptionsTests.test_incremental_image_generation Traceback (most recent call last): File "/home/user/poky/scripts/oe-selftest", line 179, in <module> ret = main() File "/home/user/poky/scripts/oe-selftest", line 164, in main suite.addTests(loader.loadTestsFromName(test)) File "/usr/lib64/python2.7/unittest/loader.py", line 91, in loadTestsFromName module = __import__('.'.join(parts_copy)) File "/home/user/poky/meta/lib/oeqa/selftest/buildoptions.py", line 12, in <module> class ImageOptionsTests(oeSelfTest): File "/home/user/poky/meta/lib/oeqa/selftest/buildoptions.py", line 14, in ImageOptionsTests @testcase(761) NameError: global name 'func' is not defined Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-12-25oeqa/utils: replace some tabs with spacesPaul Eggleton
Python code should use spaces only for indentation. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2014-09-29oeqa/utils: Added filter to LogResults decorator to enforce custom log level.Lucian Musat
Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-08-02oeqa/utils/decorators.py: add import osCorneliu Stoicescu
An 'import os' was omitted here while testing the previous decorators using runtime tests that import the os module before this one. Unfortunately oe-selftest fails because of this missing import. Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2014-07-25oeqa: Refactor test skipping decorators to use the unittest result objectLucian Musat
In order to make the test skipping decorators independent of the oeTest object we rely on the unittest result object to construct skip, fail and error lists used by these decorators. Created a new object getResults that analyses upper frames and retrieves the unittest result object instance, then return a list of failed, skipped and error tests. Also removed the oetest import from decorators.py because it was no longer required. Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-03Added testcase decorator to use in logging. Added class decorator LogResults ↵Lucian Musat
that outputs test results in separate log file. Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-04lib/oeqa: add oeTest superclassStefan Stanacar
Add oeTest superclass, make oeRuntimeTest inherit that and make the necesarry adjustments. Tests in lib/oeqa/runtime don't change, they still inherit oeRuntimeTest. We should do this because oetest.py in the future can be a base module for more stuff than oeRuntimeTest. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-08-26lib/oeqa/utils: decorators: return the decorated methodMihai Lindner
Decorators should return whatever the decorated methods return. Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-15lib/oeqa: fix dependecy checkStefan Stanacar
Adds missing skip for smart test and fix the check (which I somehow broke a while ago). Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-15testimage.bbclass, lib/oeqa: add headers and commentsStefan Stanacar
Adds some comments to testimage.bbclass and the files it calls, just to give an ideea of what it does. Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
2013-07-09lib/oeqa/utils/decorators.py: decorators for test methodsRadu Moisan
Some skip decorators meant only for test methods, providing some kind of test methods dependency. They are used together with a test method name not a condition. These are complementary to python's unittest skip decorators. Signed-off-by: Radu Moisan <radu.moisan@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>