Dear all,
I'm adding a new device to my test farm This device supports u-boot. Device-type and device have been created, I want to test a simple nfs job.
To manage to start the kernel, I need to trigger 2 commands from u-boot before launching the nfs boot command: dcache off and icache off
My question here is to know how to manage that with Lava V2. Should it be done in the device or device-type, or should it be done in the test job?
Any example is welcome.
Best regards,
Denis
On 27 March 2018 at 10:36, Denis HUMEAU denis.humeau@st.com wrote:
Dear all,
I’m adding a new device to my test farm This device supports u-boot. Device-type and device have been created, I want to test a simple nfs job.
To manage to start the kernel, I need to trigger 2 commands from u-boot before launching the nfs boot command:
dcache off and icache off
The question is are these commands essential for every test job on all devices of this device-type? Or only essential for all NFS test jobs on all devices of this device-type? If either of these are yes, then the change needs to go into the device-type jinja2. If not, the change needs to go into the test jobs themselves.
You can use the job context to override specific variables but you will need to also ensure that the original value is retained.
If this is for specific test jobs, you can use the U-Boot support for an explicit commands list which would replicate the entire command list, including placeholders.
There's no explicit support for this at the moment, so some changes to the templates are likely to make this usable for either option.
For test job context support, you would create an empty variable in the right position of the NFS commands and then populate that variable in the job context. For support of all NFS test jobs on all devices of this device-type, the commands can go into the NFS block but it's still worth creating a variable with these values as the defaults.
Best way to work out the right change is to create a unit test that takes an example device dictionary, adds a job context and then renders the template. Check that the NFS commands block is what you expect. Something based on this one: https://git.linaro.org/lava/lava-server.git/tree/lava_scheduler_app/tests/te...
test_qemu_template (just below) shows how to populate a job context in the test.
Then add a line: print(rendered)
to see the rendered template.
$ python -m unittest -vcf lava_scheduler_app.tests.test_templates.TestTemplates.test_b2260_template
My question here is to know how to manage that with Lava V2.
Should it be done in the device or device-type, or should it be done in the test job?
Any example is welcome.
Best regards,
Denis
Lava-users mailing list Lava-users@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lava-users
lava-users@lists.lavasoftware.org