Hello Marcin,
Thanks for raising this point, we really need to get rid of distro-specific code, or at least keep them at a minimum so that we can easily add support for new ones.
On Thu, Mar 21, 2013 at 10:19:40AM +0100, Marcin Juszkiewicz wrote:
Next thing is distro dependencies. For example perf test done for Ubuntu. First thing it does is finding out which exactly perf package it needs and install it. Why this is not done on image generation time? Especially when we know that all rootfs images we make end in LAVA...
IMO including everything needed for every test in the images does not scale. When we have 100 tests, each one requiring 1 package, do we want to have 100 extra packages in every image? Also, everyone creating new tests would have to coordinate with the teams that create images, which increases the communications overhead and adds bottlenecks.
And can this part be moved to install-ubuntu.sh script so for OE I could just reuse script instead of creating a copy of it? Probably similar would be with others.
I think we should provide means for tests to install dependencies in a cross-distro way, by having the tests declare a list of packages that need to need to be installed a before it is executed.
In Ubuntu, that list of packages would be passed to `apt-get install`, while in OE it would be passed into `opkg install`, etc. The LAVA dispatcher could them install a lava-install script that does the right thing on each playform and would be called to install test dependencies.
The worst case is having a package with different names in different distros, so in that case we could implement a way of specifying separate per-distro dependencies list, or advising test authors to install the tests as part of the test steps, which are shell commands anyway.