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@igalia.com>
Acked-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8702>
This commit is contained in:
Juan A. Suarez Romero 2021-01-25 12:28:05 +01:00 committed by Marge Bot
parent 23461897fe
commit ea88e1c820
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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)