aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/case.py
AgeCommit message (Collapse)Author
2018-11-27oeqa/selftest/case: Use bb.utils.remove() instead of shutil.remove()Richard Purdie
This avoids problems where shutil.remove will error with: File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd os.unlink(name, dir_fd=topfd) FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.extra' when there are races over file deletion (gpg agent may be slow to exit). We already worked around speed and race issues in bb.utils. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-11oeqa/selftest/case: fix typoHongxu Jia
s/meta-sefltest/meta-selftest/g Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-09-11oeqa/selftest/case: Add recipeinc methodOla x Nilsson
The recipeinc method returns the absolute path of the test_recipe.inc file of a specified recipe. It replaces four instances of identical code, and make it possible to access the filename from a testcase for cleanup. The write_recipeinc and append_recipeinc methods are changed to return the path to the file in case that is useful. The test_recipe.inc file is usually cleaned up in a finally block, but that block executes before any teardown operations. This blocks any teardown that requires the presence of the test_recipe.inc file. Signed-off-by: Ola x Nilsson <olani@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-21oeqa/selftest/{context,case}: Handle KeyboardInterrupt/SIGINT and SIGTERMAníbal Limón
In order to avoid corrupt local.conf and bblayers.conf adds signal handler for SIGTERM and use try/finally (KeyboardIntrrupt) block to restore previously backuped configuration. [YOCTO #11650] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-06-05oeqa/selftest/case: Don't figure out the testlayer insideAníbal Limón
The test layer is added at init of selftest and is the same across test runs so pass it as a attr in the context. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-06-05oeqa/selftest/case.py: Remove machine selection logicLeonardo Sandoval
The machine selection is an operation that needs to be made in every test run, the best place to it is on the context module. Use self.tc.custommachine variable instead of use environment. SIgned-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-06-05scripts/oe-selftest: Move {add,remove}_include files to caseLeonardo Sandoval
The oe-selftest creates include files to store custom configuration to make specific tests, every class executes a different test and may be uses custom configuration. So move to case class in order to simplify oe-selftest script and later implement later a build folder per class. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-06-05oeqa/selftest/case: Migrate case class to the new OEQA frameworkLeonardo Sandoval
Summary of the changes: - Use OETestCase as base class instead of unittest.TestCase - Remove LogResults decorator the new framework provides logging into the core functionality. - Logger is now self.logger instead of self.log - Move comments into docstrings in several help methods - Use get_test_layer() method instead of access monkey patched variable in old oeSelfTest case class. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-06-05oeqa/selftest: Move base class to case moduleAníbal Limón
To match the new structure of the OEQA framework. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>