Linaro / lite-lava-docker-compose

LITE Team LAVA docker dispatcher
MIT License
5 stars 10 forks source link

board-setup-helper.py: Add setting device_info #86

Closed galak closed 4 years ago

galak commented 4 years ago

We need device_info[].board_id set for use by docker test action.

Signed-off-by: Kumar Gala kumar.gala@linaro.org

pfalcon commented 4 years ago

So, I tried to figure out what's the meaning of this "device_info", in particular, why it is list of dicts. I tried to do that by reading LAVA docs of course. And well, I wouldn't say that it's clearly and comprehensively described. The best understanding I got is that this setting is not related to a device per se, it's related to "devices" (in wide sense) which are related to LXC containers (and by extension apparently to Docker containers). "Devices" in wide sense again, literally anything attached to USB, that's why it's a list, because we may want to "forward" multiple things to a container.

So overall, it's rather confusing. I thought maybe we could add to our device type jinja templates handling that if device_info is not specified explicitly, then we construct it based on the existing board_id.

Of course, doing it like in this patch would also work, just hardly adds clarity to this matter...

Feel free to merge if quick progress is needed.

galak commented 4 years ago

I submitted a PR to lava to fixup the device type templates so this change shouldn't be needed in the future. Was adding it in here to enable use of the docker test action until that PR gets merged and we've got an updated lava release with that change in it.

https://git.lavasoftware.org/lava/lava/-/merge_requests/1244