[libvirt] [test-API PATCH 0/2] support variables share across testcases
Guannan Ren
gren at redhat.com
Mon Apr 16 06:49:49 UTC 2012
On 04/16/2012 10:03 AM, Osier Yang wrote:
> On 2012年04月06日 17:53, Guannan Ren wrote:
>>
>> An example:
>>
>> #sharedvar.cfg
>> domain:testa
>>
>> domain:testb
>>
>>
>> #testa.py
>> import sharedmod
>>
>> def testa(params):
>> conn = sharedmod.conn
>> logger = params['logger']
>
> Given that the "connection" object is shared among
> test cases now, why not "logger" object too?
>
It's good idea, but if put the logger object in sharedmod.py
the sharedmod.py will have to be included in each testcases
right now, it is optional, only the testcase that wants to use
the connection object offered by framework should import it.
Maybe let me wait for some times until the sharedmod become
necessary mod for all testcase, then move logger into it.
More information about the libvir-list
mailing list