| Summary: | oe-selftest to detect test cases in other layers else than OE-Core | ||
|---|---|---|---|
| Product: | [QA/Testing] Build Testing | Reporter: | sharron.liu |
| Component: | general | Assignee: | Costin <costin.c.constantin> |
| Status: | RESOLVED FIXED | QA Contact: | sharron.liu |
| Severity: | enhancement | ||
| Priority: | Medium | CC: | alexandru.c.georgescu, anibal.limon, benjamin.esquivel, cathy.shen, francisco.j.pedraza.gonzalez, jing.j.wang, richard.purdie, sharron.liu |
| Version: | unspecified | ||
| Target Milestone: | 2.1 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
sharron.liu
2015-06-09 07:16:35 UTC
Alex, My test cases need to be organized into sub folders indeed, each sub folder represents a single test suite. meta-mylayer (added to "BBPATH") lib/oeqa/selftest (I want test cases here detected by oe-selftest) lib/oeqa/selftest/cfg/mytest.py ==> expect "--list-modules" list it as "cfg.mytest" lib/oeqa/selftest/cfg/files/mytest_data.json, mytest_dependency.py ==> These are test data and dependency, don't expect "--list-modules" list it is as test case. I also modify the oe-selftest a few lines for this purpose. Let me know what do you think :) Thanks, Sharron Hello Liu, Please have a look on 7833 and let me know if it suffices your needs. Costin Hi Liu, I think i did a mistake in my last comment. 7833 is not referring to something similar to this feature. However, i posted a comment with some steps to perform in order to achieve multi layer test inclusions. I will come back shortly with a patch for this request Costin Costin, Thanks for your prompt reply! You're right, 7833 is related to runtime test, while this 7865 is for build-time test. Here I would provide more detail steps for how-to-reproduce my issue :) 1. follow step 1~3 (of 7833) to add my test layer. meta-mylayer (added to "BBLAYERS", added to "BBPATH") lib/oeqa/selftest lib/oeqa/selftest/__init__.py lib/oeqa/selftest/cfg/__init__.py lib/oeqa/selftest/cfg/mytest.py lib/oeqa/selftest/cfg/files/mytest_data.json 2. from poky, setup build env, and from "BUILDDIR" type oe-selftest --list-modules 3. expect mytest being listed: <here's test modules from "meta/lib/oeqa/selftest/*.py", like buildhistory etc.> cfg.mytest 4. run mytest from oe-selftest oe-selftest --run-tests cfg.mytest 5. expect tests in "cfg.mytest" being run. Thanks, Sharron Hi Sharron, I managed to add few features to oe-selftest, allowing it to support tests from any meta*/lib/oeqa/selftest directories plus subdirectories to them. Still left to do: - considering an external cfg.mytest file for tests. Will be done shortly. I will upload the patch upstream. Costin Hi Sharron, For whatever reason, i misunderstood your needs, so please disregard comment #5. I'll come back with a solution shortly. Costin Hello, Patch submitted to be merged. This is Sharron's contribution. Costin Costin, is it merged? Hi Cathy, Just had a chat with Sharron and she proposed a better formatted version of the patch. I will update you after having a look on it Hello, As with the http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d2023c34e4c3735d919c35d80daf991aab579500 and http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=51d760e2a7e22f1b07608fc925da343e56a9ae74 oe-selftest considers test files in other layers present in bblayers.conf having lib/oeqa/selftest directory structure. Thanks for the information, Costin. I'd like to close this ticket considering it's already supported in Yocto. Thank you Cathy for the update. I delayed this comment because i wanted to clarify few things with Sharron. I will not close this feature until she will update it with her comment if the patches solve her needs. Until then marking it as resolved. (In reply to comment #12) > Thank you Cathy for the update. I delayed this comment because i wanted to > clarify few things with Sharron. I will not close this feature until she > will update it with her comment if the patches solve her needs. > Until then marking it as resolved. Hi Sharron, can you update with the info Costin needs to close the enhancement? Thanks, AlexG Changed the status to NEEDINFO Verified in latest poky (commit 4bc3f09 Sep 23 2015) meta-mylayer (added to "BBLAYERS", added to "BBPATH") lib/oeqa/selftest lib/oeqa/selftest/__init__.py lib/oeqa/selftest/cfg/__init__.py lib/oeqa/selftest/cfg/mytest.py lib/oeqa/selftest/cfg/files/mytest_data.json oe-selftest --list-modules >> here "cfg.mytest" is not listed ===> failed oe-selftest --run-tests cfg.mytest >> here "cfg.mytest" run as expected ==> passed. This was REOPENED CCing Anibal and Paco Hello, Patch submitted for review merged into master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d2a563c32c62908a8c8eb9618f86a3fc9e5fe5bc Marking as resolved |