Bug 11752

Summary: selftest test cases should use the test data and/or tinfoil instead of bitbake
Product: [QA/Testing] Runtime Testing Reporter: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Component: generalAssignee: Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: Medium CC: meta.mr.watcher, meta.watcher
Version: 2.4   
Target Milestone: 2.4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Leonardo Sandoval Gonzalez 2017-07-04 16:07:40 UTC
Selftest test cases uses the functions get_bb_var and get_bb_vars to access the datastore through a bitbake process launch & parse. This is too expensive in terms of performance and should be replaced to either query the 'test data' dictionary from the selftest main test case or use tinfoil (or both).
Comment 1 Leonardo Sandoval Gonzalez 2017-07-04 16:10:36 UTC
There is some preliminar work tracked at branch [1]. This work just focuses on querying the local test data, so no tinfoil usage at all for the moment.

[1] http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=lsandov1/selftest-use-td

No performance gains seen with the latter so far, so taken approach may be wrong.
Comment 2 Leonardo Sandoval Gonzalez 2017-09-26 16:22:27 UTC
I did some performance benchmarks with branch [1] which avoids bitbake process launch but gains are minimal (I do have the numbers) so will close this bug as wontfix. So, it was a good idea but turned in practice that it is not worth it.

[1] http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=lsandov1/selftest-use-td-debug