Skip to content

Commit

Permalink
Implement raw_devices
Browse files Browse the repository at this point in the history
Signed-off-by: Corentin LABBE <[email protected]>
  • Loading branch information
montjoie committed Jan 7, 2025
1 parent f3474b5 commit 106a7c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ slaves:
lava-coordinator: Does the slave should ran a lava-coordinator
expose_ser2net: Do ser2net ports need to be available on host
joblimit: x Add a joblimit to the worker (default 0)
rawdevices: (optional) Add devpath inside worker
- devpath
custom_volumes:
- "name:path" Add a custom volume
expose_ports: Expose port p1 on the host to p2 on the worker slave.
Expand Down
2 changes: 2 additions & 0 deletions boards-ci2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ slaves:
use_overlay_server: false
use_tftp: false
version: 2024.xx
raw_devices:
- '/dev/bus/usb'

boards:
- name: qemu-01
Expand Down
6 changes: 5 additions & 1 deletion lavalab-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def main():
"joblimit",
"loglevel", "lava-coordinator", "lava_worker_token",
"name",
"remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "remote_user_token",
"raw_devices", "remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "remote_user_token",
"tags",
"use_docker", "use_nfs", "use_nbd", "use_overlay_server", "use_tftp", "use_tap",
"version",
Expand Down Expand Up @@ -596,6 +596,10 @@ def main():
fp.write("\n")
fp.close()
os.chmod("%s/scripts/extra_actions" % workerdir, 0o755)
if "raw_devices" in worker:
for rd in worker["raw_devices"]:
dockcomp_add_device(dockcomp, worker_name, f"{rd}:{rd}")


if "devices" in worker:
udevdir = "%s/udev" % hostdir
Expand Down

0 comments on commit 106a7c2

Please sign in to comment.