diff options
Diffstat (limited to 'testenv')
-rw-r--r-- | testenv/Dockerfile | 12 | ||||
-rw-r--r-- | testenv/fakes/cpu_temp | 1 | ||||
-rw-r--r-- | testenv/fakes/dt_model | 1 | ||||
-rw-r--r-- | testenv/fakes/msd/cdrom | 1 | ||||
-rw-r--r-- | testenv/fakes/msd/file | 0 | ||||
-rw-r--r-- | testenv/fakes/msd/ro | 1 | ||||
-rwxr-xr-x | testenv/fakes/vcgencmd | 5 | ||||
-rw-r--r-- | testenv/v1-vga-rpi3.override.yaml | 4 | ||||
-rw-r--r-- | testenv/v2-hdmi-rpi4.override.yaml | 4 |
9 files changed, 25 insertions, 4 deletions
diff --git a/testenv/Dockerfile b/testenv/Dockerfile index 9c23d29c..9d9e99f9 100644 --- a/testenv/Dockerfile +++ b/testenv/Dockerfile @@ -44,10 +44,14 @@ RUN pip install -r requirements.txt RUN mkdir -p \ /etc/kvmd/nginx \ /var/lib/kvmd/msd/{images,meta} \ + /opt/vc/bin \ /fake_sysfs/sys/kernel/config/usb_gadget/kvmd/functions/mass_storage.usb0/lun.0 \ - && cd /fake_sysfs/sys/kernel/config/usb_gadget/kvmd/functions/mass_storage.usb0/lun.0 \ - && touch file \ - && echo 1 > cdrom \ - && echo 1 > ro + /fake_sysfs/sys/class/thermal/thermal_zone0 \ + /fake_procfs/proc/device-tree + +COPY testenv/fakes/vcgencmd /opt/vc/bin/ +COPY testenv/fakes/msd/* /fake_sysfs/sys/kernel/config/usb_gadget/kvmd/functions/mass_storage.usb0/lun.0/ +COPY testenv/fakes/cpu_temp /fake_sysfs/sys/class/thermal/thermal_zone0/temp +COPY testenv/fakes/dt_model /fake_procfs/proc/device-tree/model CMD /bin/bash diff --git a/testenv/fakes/cpu_temp b/testenv/fakes/cpu_temp new file mode 100644 index 00000000..9db0c8a7 --- /dev/null +++ b/testenv/fakes/cpu_temp @@ -0,0 +1 @@ +36511 diff --git a/testenv/fakes/dt_model b/testenv/fakes/dt_model new file mode 100644 index 00000000..3afd3566 --- /dev/null +++ b/testenv/fakes/dt_model @@ -0,0 +1 @@ +Virtual Raspberry Pi diff --git a/testenv/fakes/msd/cdrom b/testenv/fakes/msd/cdrom new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/testenv/fakes/msd/cdrom @@ -0,0 +1 @@ +1 diff --git a/testenv/fakes/msd/file b/testenv/fakes/msd/file new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/testenv/fakes/msd/file diff --git a/testenv/fakes/msd/ro b/testenv/fakes/msd/ro new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/testenv/fakes/msd/ro @@ -0,0 +1 @@ +1 diff --git a/testenv/fakes/vcgencmd b/testenv/fakes/vcgencmd new file mode 100755 index 00000000..3f4990c6 --- /dev/null +++ b/testenv/fakes/vcgencmd @@ -0,0 +1,5 @@ +#!/bin/sh +case $1 in + get_throttled) echo "throttled=0x0";; + measure_temp) echo "temp=35.0'C";; +esac diff --git a/testenv/v1-vga-rpi3.override.yaml b/testenv/v1-vga-rpi3.override.yaml index 718112f7..192ffa53 100644 --- a/testenv/v1-vga-rpi3.override.yaml +++ b/testenv/v1-vga-rpi3.override.yaml @@ -2,6 +2,10 @@ kvmd: server: unix_mode: 0666 + hw: + procfs_prefix: /fake_procfs + sysfs_prefix: /fake_sysfs + hid: device: /dev/ttyS10 noop: true diff --git a/testenv/v2-hdmi-rpi4.override.yaml b/testenv/v2-hdmi-rpi4.override.yaml index b5003a55..47a1d32c 100644 --- a/testenv/v2-hdmi-rpi4.override.yaml +++ b/testenv/v2-hdmi-rpi4.override.yaml @@ -2,6 +2,10 @@ kvmd: server: unix_mode: 0666 + hw: + procfs_prefix: /fake_procfs + sysfs_prefix: /fake_sysfs + hid: keyboard: device: /dev/null |