Mesa (master): ci/vc4: allow custom timeout values for activity

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 26 10:04:18 UTC 2021


Module: Mesa
Branch: master
Commit: ea88e1c820cbb753e64b6a15efbb0abda06666f1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ea88e1c820cbb753e64b6a15efbb0abda06666f1

Author: Juan A. Suarez Romero <jasuarez at igalia.com>
Date:   Mon Jan 25 12:28:05 2021 +0100

ci/vc4: allow custom timeout values for activity

The script that monitors activity in the serial assumes that something
was wrong if it does not detect activity in 60 seconds, rebooting the
device and re-trying the test again.

While this timeout is enough for most cases, in some cases it is not
enough. For instance, when executing piglit testsuite it takes quite a
few time to generate the results after the test is done.

This allow to setup a custom timeout (`BM_POE_TIMEOUT`) in the proper
jobs.

Signed-off-by: Juan A. Suarez Romero <jasuarez at igalia.com>
Acked-by: Andres Gomez <agomez at igalia.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8702>

---

 .gitlab-ci/bare-metal/poe-powered.sh | 3 ++-
 .gitlab-ci/bare-metal/poe_run.py     | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci/bare-metal/poe-powered.sh b/.gitlab-ci/bare-metal/poe-powered.sh
index c3e8769b52b..de413b22bb8 100755
--- a/.gitlab-ci/bare-metal/poe-powered.sh
+++ b/.gitlab-ci/bare-metal/poe-powered.sh
@@ -100,7 +100,8 @@ while [ $((ATTEMPTS--)) -gt 0 ]; do
   python3 $BM/poe_run.py \
           --dev="$BM_SERIAL" \
           --powerup="$BM_POWERUP" \
-          --powerdown="$BM_POWERDOWN"
+          --powerdown="$BM_POWERDOWN" \
+          --timeout="${BM_POE_TIMEOUT:-60}"
   ret=$?
 
   if [ $ret -eq 2 ]; then
diff --git a/.gitlab-ci/bare-metal/poe_run.py b/.gitlab-ci/bare-metal/poe_run.py
index 8abffd19977..804522bad6d 100755
--- a/.gitlab-ci/bare-metal/poe_run.py
+++ b/.gitlab-ci/bare-metal/poe_run.py
@@ -32,7 +32,7 @@ class PoERun:
     def __init__(self, args):
         self.powerup = args.powerup
         self.powerdown = args.powerdown
-        self.ser = SerialBuffer(args.dev, "results/serial-output.txt", "", 60)
+        self.ser = SerialBuffer(args.dev, "results/serial-output.txt", "", args.timeout)
 
     def logged_system(self, cmd):
         print("Running '{}'".format(cmd))
@@ -77,6 +77,8 @@ def main():
     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('--timeout', type=int, default=60,
+                        help='time in seconds to wait for activity', required=False)
     args = parser.parse_args()
 
     poe = PoERun(args)



More information about the mesa-commit mailing list