avocado.test: Add support for params with paths
This is a testing version of params with paths support. By default
it acts as the old Params, but you can use params.get(key, path=....)
to utilize new-params handling.
For now the PATH for relative paths is hardcoded to "/test/*" but it
will be specifiable on the command line. I just need to pass it to the
test which I'd like to do over "metadata" (see below) rather then adding
it temporarily to the params and risk colisions.
The code is not optimized and in order to be compatible it uses old
concepts. Some of them I'd like to get rid of in near future:
* default_params => currently used only to set default "metadata" like
test timeout. I'd like to replace it for RW Test.metadata, which would
be overwritten durint __init__ if params contain the keys in specific
paths. IMO they shouldn't be shared with test params.
* test_factory's params are currently dict with some metadata like
wether this test is executed from directory or by uri. Again, they are
metadata and should be handled separately. Some of them might be reused
to params if needed, but not generaly.
* create separated multiplexer plugin generate multiple variants
* reconsider the need for "objects", "object_params" and "object_counts"
* couple of others I forget to mention...
There is one real change I made, I got rid of ${key}_${type} to specify
type of the argument. Yaml supports any type we might like and by
our convention all tests should be written to work without any params.
Thus this is IMO more confusing, than beneficial. But if you insist
I can copy&paste the support for it.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
Showing
avocado/utils/params.py
已删除
100644 → 0
想要评论请 注册 或 登录