Bug 10368

Summary: QA Bitbake: create setup and basic unit tests for event module
Product: [Build System, Metadata & Runtime] BitBake Reporter: Aníbal Limón <anibal.limon>
Component: bitbakeAssignee: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia>
Status: VERIFIED FIXED QA Contact: oscar lopez arandas <oscarx.lopez.arandas>
Severity: enhancement    
Priority: Medium+ CC: joshuagloe, poky.bs.watcher, poky.watcher, richard.purdie, sonia.delgado
Version: 2.4   
Target Milestone: 2.4 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Bug Depends on:    
Bug Blocks: 10773    
Attachments:
Description Flags
log none

Description Aníbal Limón 2016-10-04 15:35:08 UTC
The bitbake event module (lib/bb/event.py) don't have tests, the current tests of bitbake are in (lib/bb/tests) so it need to create the test plan and the tests associated with it.
Comment 1 Jair Gonzalez 2016-12-09 17:33:51 UTC
This bug has been split in two tasks. The current one will track the server and client doubles setup and the creation of basic functionality tests covering the main communication methods and at least three events. Bug 10733 will be used to track extending and completing the bb event module's test coverage.
Comment 2 Jair Gonzalez 2016-12-15 04:57:19 UTC
This enhancement bug will include the following items:
- Client and server stubs setup
- Testing the module's main functions including:
	- get_class_handlers()
	- set_class_handlers(h)
	- clean_class_handlers()
	- enable_threadlock()
	- disable_threadlock()
	- get_handlers()
	- set_handlers(handlers)
	- execute_handler(name, handler, event, d)
	- fire_class_handlers(event, d)
	- print_ui_queue()
	- fire_ui_handlers(event, d)
	- fire(event, d)
	- fire_from_worker(event, d)
	- register(name, handler, mask=None, filename=None, lineno=None)
	- remove(name, handler)
	- register_UIHhandler(handler, mainui=False)
	- unregister_UIHhandler(handlerNum)
- Testing event handling using:
	- class Event(object)
	- class OperationStarted(Event)
	- class OperationCompleted(Event)
	- class OperationProgress(Event)
Comment 3 Jair Gonzalez 2017-01-20 23:16:24 UTC
Submitted patch set to poky-contrib on http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=jairglez/bbevents

Currently waiting for test results on http://yctb01.zpn.intel.com:8010/builders/nightly-oe-selftest/builds/312
Comment 4 Jair Gonzalez 2017-01-23 18:31:55 UTC
Patch set has been submitted to OE-core list:
http://lists.openembedded.org/pipermail/openembedded-core/2017-January/131628.html
Comment 5 Jair Gonzalez 2017-01-23 23:33:19 UTC
Changed Copyright to Intel in the header comments section and submitted the patch again to the proper list (bitbake-devel):
http://lists.openembedded.org/pipermail/bitbake-devel/2017-January/008412.html
Comment 6 Jair Gonzalez 2017-02-21 18:27:19 UTC
Patch set V2 has been submitted to OE-core list:
http://lists.openembedded.org/pipermail/bitbake-devel/2017-February/008455.html
Comment 7 Jair Gonzalez 2017-03-14 17:45:44 UTC
Moving the target to 2.4 M1 as the patch was not merged on 2.3 M3.
Comment 8 Jair Gonzalez 2017-06-19 23:54:32 UTC
Moving the target to 2.4 M2 as the patch was not merged on 2.4 M1.
Comment 9 Jair Gonzalez 2017-06-30 17:07:53 UTC
Patchset V4 (http://lists.openembedded.org/pipermail/bitbake-devel/2017-May/008678.html) hes been merged to master.
Comment 10 oscar lopez arandas 2017-10-06 19:27:55 UTC
the verified bitbake-selftest in commit:
 bd063fa288b49b6e3ea77982d0ccc46610feb1ad
ubuntu16.04

STEPS:
1- $ clone poky
2- $ cd poky
3- $ git checkout bd063fa288b49b6e3ea77982d0ccc46610feb1ad
4- $ source oe-init-build-env
5- $ bitbake-selftest

 All test cases are executed and no errors are reported.

note:
log in attchanment
Comment 11 oscar lopez arandas 2017-10-06 19:28:49 UTC
Created attachment 4062 [details]
log