mesa/.gitlab-ci/bare-metal/poe_run.py

111 lines
3.7 KiB
Python
Raw 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
#!/usr/bin/env python3
#
# Copyright © 2020 Igalia, S.L.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
import argparse
import os
import re
from serial_buffer import SerialBuffer
import sys
import threading
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
class PoERun:
def __init__(self, args, test_timeout):
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
self.powerup = args.powerup
self.powerdown = args.powerdown
self.ser = SerialBuffer(
args.dev, "results/serial-output.txt", "")
self.test_timeout = test_timeout
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
def print_error(self, message):
RED = '\033[0;31m'
NO_COLOR = '\033[0m'
print(RED + message + NO_COLOR)
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
def logged_system(self, cmd):
print("Running '{}'".format(cmd))
return os.system(cmd)
def run(self):
if self.logged_system(self.powerup) != 0:
return 1
boot_detected = False
for line in self.ser.lines(timeout=5 * 60, phase="bootloader"):
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
if re.search("Booting Linux", line):
boot_detected = True
break
if not boot_detected:
self.print_error(
"Something wrong; couldn't detect the boot start up sequence")
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
return 2
for line in self.ser.lines(timeout=self.test_timeout, phase="test"):
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
if re.search("---. end Kernel panic", line):
return 1
# Binning memory problems
if re.search("binner overflow mem", line):
self.print_error("Memory overflow in the binner; GPU hang")
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
return 1
if re.search("nouveau 57000000.gpu: bus: MMIO read of 00000000 FAULT at 137000", line):
self.print_error("nouveau jetson boot bug, retrying.")
return 2
result = re.search("hwci: mesa: (\S*)", line)
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
if result:
if result.group(1) == "pass":
return 0
else:
return 1
self.print_error(
"Reached the end of the CPU serial log without finding a result")
return 2
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
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
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--dev', type=str,
help='Serial device to monitor', required=True)
parser.add_argument('--powerup', type=str,
help='shell command for rebooting', required=True)
parser.add_argument('--powerdown', type=str,
help='shell command for powering off', required=True)
parser.add_argument(
'--test-timeout', type=int, help='Test phase timeout (minutes)', required=True)
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
args = parser.parse_args()
poe = PoERun(args, args.test_timeout * 60)
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
retval = poe.run()
poe.logged_system(args.powerdown)
sys.exit(retval)
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
if __name__ == '__main__':
main()