Module: Mesa Branch: main Commit: 42a52a8be117127d8b51a57aa945c70386f13c7c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=42a52a8be117127d8b51a57aa945c70386f13c7c
Author: Emma Anholt <[email protected]> Date: Thu Jul 21 11:18:20 2022 -0700 ci/bare-metal: Re-open serial and everything after test phase timeout. If we got a "Reached the end of the CPU serial log without finding a result" because the test phase timed out, then the CPU serial would have been closed as part of the timeout process, so we need to close the rest and re-instantiate the servo run class. fastboot and poe already re-instantiate the class on retry. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17689> --- .gitlab-ci/bare-metal/cros_servo_run.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci/bare-metal/cros_servo_run.py b/.gitlab-ci/bare-metal/cros_servo_run.py index a5593c46d44..f67bc06ca2c 100755 --- a/.gitlab-ci/bare-metal/cros_servo_run.py +++ b/.gitlab-ci/bare-metal/cros_servo_run.py @@ -164,19 +164,16 @@ def main(): '--test-timeout', type=int, help='Test phase timeout (minutes)', required=True) args = parser.parse_args() - servo = CrosServoRun(args.cpu, args.ec, args.test_timeout * 60) - while True: + servo = CrosServoRun(args.cpu, args.ec, args.test_timeout * 60) retval = servo.run() - if retval != 2: - break - # power down the CPU on the device - servo.ec_write("power off\n") + # power down the CPU on the device + servo.ec_write("power off\n") + servo.close() - servo.close() - - sys.exit(retval) + if retval != 2: + sys.exit(retval) if __name__ == '__main__':
