avocado.core.multiplexer: Define multiplexer API
This patch is a 1st step to independent multiplex plugin. It unifies the
multiplexation, which is handled exclusively by the
avocado.core.multiplexer.Mux object, which is initialized directly in
argument parser as `args.mux`, instead of the
`parser.default_avocado_params`.
The idea is to provide unified database with simple interface:
* data_inject - inject key/value[/path] data
* data_merge - merge node/tree into the data
Additionally it supports internal API to generate the params:
* is_parsed - whether it was already initialized/filtered/...
* get_number_of_tests - reports number of test*variants
* itertests - iterate through tests
All those changes are pickle-safe from the old object to the new object
(not vice versa), therefor it's possible to use old Mux objects stored
in `jobdata` to replay tests.
This API is not 100% stable yet, but we plan to keep the one sided
pickle compatibility into the future (no guarantee, but we'll do our
best).
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
Showing
想要评论请 注册 或 登录