Usbg device - #80
Usbg device#80
Conversation
0bb6827 to
9dee019
Compare
| from tuxrun.assets import get_rootfs, get_test_definitions | ||
| from tuxrun.utils import ProgressIndicator, pathurlnone, DEFAULT_DISPATCHER_DOWNLOAD_DIR | ||
|
|
||
| from tuxlava.argparse import DownloadAction # type: ignore |
There was a problem hiding this comment.
this only came in on recent tuxlava version, do you think we should pin it? tuxlava>=0.26.0
| "device_dict": options.device_dict, | ||
| "mcp_fw": options.mcp_fw, | ||
| "mcp_romfw": options.mcp_romfw, | ||
| "downloads": options.downloads, |
There was a problem hiding this comment.
don't we need to add downloads to same loop as modules/files etc? Otherwise lava-run won't know what to do with it?
There was a problem hiding this comment.
Also, the middle patch doesn't pass tests for me. It asserts URL strings in test_downloads_reach_the_job but tuxlava 0.26.0 hands back (url, None) tuples. Could the filename support fold into the first commit, keeping the networking one separate?
| self.network = os.path.basename(tmpdir) | ||
| subprocess.run(["podman", "network", "create", self.network]) | ||
| if self.qemu_image is None: | ||
| if self.qemu_image is None and not self._use_host_network: |
There was a problem hiding this comment.
Just a heads up the runtimes have no tests. test_use_host_network never calls pre_run(). Not a blocker of course, but might be worth extending.
A usbg job needs its own downloads, like the disk image that the dispatcher exports over USB. tuxrun did not know about them, so --firmware was an unrecognized argument. Add --firmware, --os and --downloads. Each takes a URL and optionally a file name to save it as. Use the action from tuxlava, so both parse it the same way. A local file is bind mounted into the container, same as modules and overlays. DownloadAction came in tuxlava 0.26.0, so require that version. Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
With --device-dict the podman runtime got both the bridge network and host networking. Podman fails with "host conflicts with bridge". Skip the bridge network when host networking is used. Add a test that calls pre_run() with host networking. Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
No description provided.