| Summary: | Single Test case can be self-executed without test runner | ||
|---|---|---|---|
| Product: | [QA/Testing] Runtime Testing | Reporter: | Cathy Shen <cathy.shen> |
| Component: | general | Assignee: | Cathy Shen <cathy.shen> |
| Status: | VERIFIED OBSOLETE | QA Contact: | Bogdan Alexandru Voiculescu <bogdanx.a.voiculescu> |
| Severity: | enhancement | ||
| Priority: | Medium+ | CC: | alexandru.c.georgescu, bogdanx.a.voiculescu, costin.c.constantin |
| Version: | 2.1 | ||
| Target Milestone: | 2.1 M2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Cathy Shen
2015-10-11 13:35:20 UTC
Hy Cathy, I'm not sure if something created to inherit oeRuntimeTest class functionality can be completely extracted and behave as a stand alone thing. However, for consistency, i think a good approach is to make runexported.py consider one test only like e.g: ./runexported.py --run_test mytest.test_something I think this is the best and safest approach and also dev. friendly. Please share your thoughts on this Thank you, Costin Hi Costin, For python test cases, we'd like to run like this: $python ./mytest.test_something.py That means runner and controller are separated, single python test case can run directly by above command, of course, controller should be invoked by test cases. Hi Cathy, There might be a way to do this. I am thinking of gathering the reusable code from the test runner into a class, and adding a __main__ part into the test suites' code, so it will become runnable by itself, that will call the class from the runner when executed directly. Of course all the data that is available for bitbake should be available for the tests so we'll still need the testdata.json to be exported and present in the runtime folder. I have made a proof of concept with one of our suites and it works fine without having to modify the existing tests, just append some lines at the beginning. http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=lucian/selfexecution&id=7028e451e92a5ddd8f45178d4736548a20ab88ff (In reply to comment #3) > Hi Cathy, > > There might be a way to do this. I am thinking of gathering the reusable > code from the test runner into a class, and adding a __main__ part into the > test suites' code, so it will become runnable by itself, that will call the > class from the runner when executed directly. Of course all the data that is > available for bitbake should be available for the tests so we'll still need > the testdata.json to be exported and present in the runtime folder. > I have made a proof of concept with one of our suites and it works fine > without having to modify the existing tests, just append some lines at the > beginning. > > http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=lucian/ > selfexecution&id=7028e451e92a5ddd8f45178d4736548a20ab88ff Hi Cathy, Please let us know if the solution proposed by Lucian suffices your needs. (In reply to comment #4) > (In reply to comment #3) > > Hi Cathy, > > > > There might be a way to do this. I am thinking of gathering the reusable > > code from the test runner into a class, and adding a __main__ part into the > > test suites' code, so it will become runnable by itself, that will call the > > class from the runner when executed directly. Of course all the data that is > > available for bitbake should be available for the tests so we'll still need > > the testdata.json to be exported and present in the runtime folder. > > I have made a proof of concept with one of our suites and it works fine > > without having to modify the existing tests, just append some lines at the > > beginning. > > > > http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=lucian/ > > selfexecution&id=7028e451e92a5ddd8f45178d4736548a20ab88ff > > Hi Cathy, > Please let us know if the solution proposed by Lucian suffices your needs. Sorry for late response. Jing is working with Richard on the redesign of oeRuntime runner. The general concept is to split it to base runner and project specific parts. We can provide this feature based on the new design. I'd like to close this requirement. Verified; obsolete: design change in progress. |