mesa/.gitlab-ci/bare-metal/poe-on

20 lines
516 B
Plaintext
Raw Permalink Normal View History

ci: add testing for VC4 drivers (Raspberry Pi 3) This tests OpenGL ES 2.0 CTS suite with VC4 drivers, through baremetal Raspberry Pi 3 devices. The devices are connected to a switch that supports Power over Ethernet (PoE), so the devices can be started/stopped through the switch, and also to a host that runs the GitLab runner through serial-to-USB cables, to monitor the devices to know when the testing finishes. The Raspberries uses a network boot, using NFS and TFTP. For the root filesystem, they use the one created in the armhf container. For the kernel/modules case, this is handled externally. Currently it is using the same kernel/modules that come with the Raspberry Pi OS. In future we could build them in the same armhf container. At this moment we only test armhf architecture, as this is the default one suggested by the Raspberry Pi Foundation. In future we could also add testing for arm64 architecture. Finally, for the very rare ocassions where the Raspberry Pi 3 device is booted but no data is received, it retries the testing for a second time, powering off and on the device in the process. v2: - Remove commit that exists capture devcoredump (Eric) - Squash remaining commits in one (Andres) v3: - Add missing boot timeout check (Juan) v4: - Use locks when running the PoE on/off script (Eric) - Use a timeout for serial read (Eric) v5: - Rename stage to "raspberrypi" (Eric) - Bump up arm64_test tag (Eric) v6: - Make serial buffer timeout optional (Juan) Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7628>
2020-11-15 19:57:55 +00:00
#!/bin/bash
if [ -z "$BM_POE_INTERFACE" ]; then
echo "Must supply the PoE Interface to power up"
exit 1
fi
if [ -z "$BM_POE_ADDRESS" ]; then
echo "Must supply the PoE Switch host"
exit 1
fi
SNMP_KEY="SNMPv2-SMI::mib-2.105.1.1.1.3.1.`expr 48 + $BM_POE_INTERFACE`"
SNMP_ON="i 1"
SNMP_OFF="i 2"
flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_OFF"
sleep 3s
flock /var/run/poe.lock -c "snmpset -v2c -r 3 -t 30 -cmesaci $BM_POE_ADDRESS $SNMP_KEY $SNMP_ON"