diff --git a/.gitlab-ci/bare-metal/poe-powered.sh b/.gitlab-ci/bare-metal/poe-powered.sh index 116e6a9824f..e25664675e4 100755 --- a/.gitlab-ci/bare-metal/poe-powered.sh +++ b/.gitlab-ci/bare-metal/poe-powered.sh @@ -75,8 +75,6 @@ section_start prepare_rootfs "Preparing rootfs components" set -ex -date +'%F %T' - # Clear out any previous run's artifacts. rm -rf results/ mkdir -p results @@ -85,8 +83,6 @@ mkdir -p results # state, since it's volume-mounted on the host. rsync -a --delete $BM_ROOTFS/ /nfs/ -date +'%F %T' - # If BM_BOOTFS is an URL, download it if echo $BM_BOOTFS | grep -q http; then curl -L --retry 4 -f --retry-all-errors --retry-delay 60 \ @@ -94,8 +90,6 @@ if echo $BM_BOOTFS | grep -q http; then BM_BOOTFS=/tmp/bootfs.tar fi -date +'%F %T' - # If BM_BOOTFS is a file, assume it is a tarball and uncompress it if [ -f "${BM_BOOTFS}" ]; then mkdir -p /tmp/bootfs @@ -103,8 +97,6 @@ if [ -f "${BM_BOOTFS}" ]; then BM_BOOTFS=/tmp/bootfs fi -date +'%F %T' - # Install kernel modules (it could be either in /lib/modules or # /usr/lib/modules, but we want to install in the latter) if [ -n "${BM_BOOTFS}" ]; then @@ -115,8 +107,6 @@ else fi -date +'%F %T' - # Install kernel image + bootloader files if [ -z "$BM_BOOTFS" ]; then mv "${BM_KERNEL}" "${BM_DTB}.dtb" /tftp/ @@ -124,13 +114,9 @@ else # BM_BOOTFS rsync -aL --delete $BM_BOOTFS/boot/ /tftp/ fi -date +'%F %T' - # Create the rootfs in the NFS directory . $BM/rootfs-setup.sh /nfs -date +'%F %T' - echo "$BM_CMDLINE" > /tftp/cmdline.txt # Add some options in config.txt, if defined @@ -180,13 +166,10 @@ python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close-dut-job python3 $CI_INSTALL/custom_logger.py ${STRUCTURED_LOG_FILE} --close set -e -date +'%F %T' - # Bring artifacts back from the NFS dir to the build dir where gitlab-runner # will look for them. cp -Rp /nfs/results/. results/ -date +'%F %T' section_end dut_cleanup exit $ret diff --git a/.gitlab-ci/bare-metal/poe_run.py b/.gitlab-ci/bare-metal/poe_run.py index d9c884104ad..dee95255394 100755 --- a/.gitlab-ci/bare-metal/poe_run.py +++ b/.gitlab-ci/bare-metal/poe_run.py @@ -25,17 +25,16 @@ import argparse import os import re import sys -import threading from custom_logger import CustomLogger from serial_buffer import SerialBuffer + class PoERun: def __init__(self, args, boot_timeout, test_timeout, logger): self.powerup = args.powerup self.powerdown = args.powerdown - self.ser = SerialBuffer( - args.dev, "results/serial-output.txt", ": ") + self.ser = SerialBuffer(args.dev, "results/serial-output.txt") self.boot_timeout = boot_timeout self.test_timeout = test_timeout self.logger = logger diff --git a/.gitlab-ci/bare-metal/rootfs-setup.sh b/.gitlab-ci/bare-metal/rootfs-setup.sh index 90e45a61f36..3f83f084325 100644 --- a/.gitlab-ci/bare-metal/rootfs-setup.sh +++ b/.gitlab-ci/bare-metal/rootfs-setup.sh @@ -9,14 +9,10 @@ mkdir -p $rootfs_dst/results cp $BM/bm-init.sh $rootfs_dst/init cp $CI_COMMON/init*.sh $rootfs_dst/ -date +'%F %T' - # Make JWT token available as file in the bare-metal storage to enable access # to MinIO cp "${S3_JWT_FILE}" "${rootfs_dst}${S3_JWT_FILE}" -date +'%F %T' - cp "$SCRIPTS_DIR/setup-test-env.sh" "$rootfs_dst/" set +x @@ -30,5 +26,3 @@ set -x # Add the Mesa drivers we built, and make a consistent symlink to them. mkdir -p $rootfs_dst/$CI_PROJECT_DIR rsync -aH --delete $CI_PROJECT_DIR/install/ $rootfs_dst/$CI_PROJECT_DIR/install/ - -date +'%F %T' diff --git a/.gitlab-ci/bare-metal/serial_buffer.py b/.gitlab-ci/bare-metal/serial_buffer.py index f57060e1865..94fa93323a3 100755 --- a/.gitlab-ci/bare-metal/serial_buffer.py +++ b/.gitlab-ci/bare-metal/serial_buffer.py @@ -22,7 +22,6 @@ # IN THE SOFTWARE. import argparse -from datetime import datetime, UTC import queue import serial import threading @@ -30,7 +29,7 @@ import time class SerialBuffer: - def __init__(self, dev, filename, prefix, timeout=None, line_queue=None): + def __init__(self, dev, filename, timeout=None, line_queue=None): self.filename = filename self.dev = dev @@ -49,7 +48,6 @@ class SerialBuffer: self.line_queue = line_queue else: self.line_queue = queue.Queue() - self.prefix = prefix self.timeout = timeout self.sentinel = object() self.closing = False @@ -88,7 +86,7 @@ class SerialBuffer: break self.byte_queue.put(b) except Exception as err: - print(self.prefix + str(err)) + print(str(err)) break self.byte_queue.put(self.sentinel) @@ -130,10 +128,7 @@ class SerialBuffer: if b == b'\n'[0]: line = line.decode(errors="replace") - ts = datetime.now(tz=UTC) - ts_str = f"{ts.hour:02}:{ts.minute:02}:{ts.second:02}.{int(ts.microsecond / 1000):03}" - print("{endc}{time}{prefix}{line}".format( - time=ts_str, prefix=self.prefix, line=line, endc='\033[0m'), flush=True, end='') + print("{endc}{line}".format(line=line, endc='\033[0m'), flush=True, end='') self.line_queue.put(line) line = bytearray() @@ -170,12 +165,10 @@ def main(): parser.add_argument('--dev', type=str, help='Serial device') parser.add_argument('--file', type=str, help='Filename for serial output', required=True) - parser.add_argument('--prefix', type=str, - help='Prefix for logging serial to stdout', nargs='?') args = parser.parse_args() - ser = SerialBuffer(args.dev, args.file, args.prefix or "") + ser = SerialBuffer(args.dev, args.file) for line in ser.lines(): # We're just using this as a logger, so eat the produced lines and drop # them