On 02/17/2014 11:54 AM, Chris Evich wrote:
> Since the test-runner pseudo-mocks <autotest + control + run_tests()>
> the practical fix-point is in run_tests and the test runner.  Both of
> them are able to determine the super-classes required, and therefor are
> able to pass those references down (where their base-class interface can
> be used).

...err looking at the runner and virt.py more, there is quite a lot of
duplicate functionality between:

virt.py class virt(test.test)
and
virttest/standalone_test.py class Test(object)

Within these classes, references are held to both the env-stuff and the
TP-stuff.  So I see two approaches (maybe there are others):

A:

1) De-duplicate Test & Virt
2) Add shared behavior whereby env_process calls are given a reference
to the main subject-subclass to use (i.e. libvirt_vm.VM, qemu_vm.VM, or
whatever).
-or-
2) Take over responsibility for instantiating the main test subject and
handing it off / storing it in Env.
3) env_process goes about it's merry-way, relying on the BaseVM (or
BaseWhatever) interface on whatever super-class (or instance) it receives.

B:

Similar to A2, except we duplicate the functionality of 2-3 in both
virt() and Test() (or bring a shared implementation in by some other
method).

-- 
Chris Evich, RHCA, RHCE, RHCDS, RHCSS
Quality Assurance Engineer
e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214

_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel

Reply via email to