-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
W dniu 15.04.2013 15:32, Antonio Terceiro pisze:
How I can write one test which will cover different distributions with names of dependencies written for each of them?
For example I want to run "hrw-test-umbaumbau" test under Fedora, OpenEmbedded, Ubuntu. It requires working toolchain on device and SLang development headers. Each distro needs other names... Today I would write a copy for each distribution.
There is ongoing to work to push dependency installation to a helper script that is provided by the distro-specific support scripts:
https://code.launchpad.net/~terceiro/lava-dispatcher/modularize-distro-suppo...
Basically, when you list deps p1, p2 and p3, lava will call `lava-install-packages p1 p2 p3` on the target, where lava-install-packages is a script that does the right thing for that distro.
When you have packages with different names, though, this approach does not work. In this case you have to remember that lava-test-shell allows you to run whatever you want on the target, and handle the different cases for each distro in your test script.
In that case, perhaps we could provide a binary called `lava-distro` that prints the name of the distro where the test is being run, so that nobody needs to duplicate distro-detection logic. What do you think?
What about this:
====================== metadata: name: hrw-umba-umba2 format: "Lava-Test-Shell Test Definition 1.0" description: "Test to check Umba on Umba Umba"
os: - ubuntu - fedora - openembedded
install: deps:
deps-ubuntu: - linux-libc-dev - build-essential
deps-fedora: - glibc-devel - build-essential-like-package
devices: - vexpress64 - umbaumba
run: steps: - "sh run-test.sh" - "sh gather-results.sh" ======================
LAVA has list of supported systems (ubuntu, fedora, openembedded in that test) and has a list of deps for ubuntu, separate one for fedora and empty fallback just in case (can be omitted). OpenEmbedded skips install part because all required components are in image already.
This way if we will add for example Slackware to the list you have to add it to 'lava-install-package' script and test authors may decide do they want to support it or not.