Hey Chris,

On Sat, Sep 6, 2014 at 6:18 AM, Chris J Arges <[email protected]>
wrote:

> Hi,
> I'm working on getting virt-test working a bit better on Ubuntu, and I'd
> like to figure out how to best write code to accomplish making bits work
> easily on other distros.
>
> One thing I noticed was that in tp-qemu there are a few yum references
> either hardcoded into the python tests, or as configuration variables.
>
The previous style of dealing with the distro is hardcoding
the packages names/paths, then test it on some distros, to
make sure the test case can work well on some specific distros.
For me, RHEL/Fedora/Ubuntu would be tested after I created a
new case.

So that's why you find yum packages hardcoded, actually we
also hardcoded some ubuntu packages under the "Ubuntu" config
parameter.


>
> Since I'm new to this code base, is there an easy to use distro-neutral
> 'install package X' python function somewhere that can be used? If not,
> where would be the best place to write such a function (virt-tests,
> tp-qemu)?
>
Actually we do have this functionality in autotest,
Lucas, could you show Chris the class for software management?



>
> Overall it would be great if a test case required packages to be
> installed in the virt guest to have a generic parameter such as
> 'vm_install_packages = valgrind'. Then the test case parses this and
> determines which distro the VM is and attempts to use that package
> manager for installing any package dependencies.
>
The main difficult is different package name among these
distros, so we have to let the package management class
'guess' what we actually need, but I don't think the class
is as smart as human. :p


> Anyway, feedback would be helpful before I embark on hacking on this.
>
> Thanks,
> --chris j arges
>
> _______________________________________________
> Virt-test-devel mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/virt-test-devel
>



-- 
"""
Qt Zhou
Pythoner, Linuxer.
"""
_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel

Reply via email to