ci/bare-metal: Fix capturing of serial output as job artifacts.
authorEric Anholt <eric@anholt.net>
Mon, 31 Aug 2020 20:04:28 +0000 (13:04 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 3 Sep 2020 23:22:43 +0000 (23:22 +0000)
I tried to put them in the wrong directory -- everything needs to go in
results/, which we want clean and ready before we start our job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6529>

.gitlab-ci/bare-metal/cros-servo.sh
.gitlab-ci/bare-metal/cros_servo_run.py

index 6de59d97a683c7fe6d3f0b6d27bca97fa50c13dd..b05eaec50ec31dc512105dccacca42a8b8dd05aa 100755 (executable)
@@ -50,7 +50,6 @@ set -ex
 # Clear out any previous run's artifacts.
 rm -rf results/
 mkdir -p results
 # Clear out any previous run's artifacts.
 rm -rf results/
 mkdir -p results
-find artifacts/ -name serial\*.txt  | xargs rm -f
 
 # Create the rootfs in the NFS directory.  rm to make sure it's in a pristine
 # state, since it's volume-mounted on the host.
 
 # Create the rootfs in the NFS directory.  rm to make sure it's in a pristine
 # state, since it's volume-mounted on the host.
@@ -72,9 +71,7 @@ ret=$?
 set -e
 
 # Bring artifacts back from the NFS dir to the build dir where gitlab-runner
 set -e
 
 # Bring artifacts back from the NFS dir to the build dir where gitlab-runner
-# will look for them.  Note that results/ may already exist, so be careful
-# with cp.
-mkdir -p results
+# will look for them.
 cp -Rp /nfs/results/. results/
 
 exit $ret
 cp -Rp /nfs/results/. results/
 
 exit $ret
index b53763be2590974f9c3f21e9db2627cea41b864f..6d7f601e059207bacf3ad8b017a75fb9f82c8f06 100755 (executable)
@@ -35,8 +35,8 @@ class CrosServoRun:
         self.sentinel = object()
         self.threads_done = 0
 
         self.sentinel = object()
         self.threads_done = 0
 
-        self.ec_ser = SerialBuffer(ec, "artifacts/serial-ec.txt", "R SERIAL-EC> ")
-        self.cpu_ser = SerialBuffer(cpu, "artifacts/serial.txt", "R SERIAL-CPU> ")
+        self.ec_ser = SerialBuffer(ec, "results/serial-ec.txt", "R SERIAL-EC> ")
+        self.cpu_ser = SerialBuffer(cpu, "results/serial.txt", "R SERIAL-CPU> ")
 
         self.iter_feed_ec = threading.Thread(target=self.iter_feed_queue, daemon=True, args=(self.ec_ser.lines(),))
         self.iter_feed_ec.start()
 
         self.iter_feed_ec = threading.Thread(target=self.iter_feed_queue, daemon=True, args=(self.ec_ser.lines(),))
         self.iter_feed_ec.start()