From be8f747b7a471b99336c8e49ce0393710e3fe162 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 13 Feb 2021 19:29:20 +1100 Subject: [PATCH] autotest: adjust timeout for Valgrind; disable for gdb --- Tools/autotest/autotest.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Tools/autotest/autotest.py b/Tools/autotest/autotest.py index d7e35b9894..b769dc054e 100755 --- a/Tools/autotest/autotest.py +++ b/Tools/autotest/autotest.py @@ -796,7 +796,7 @@ if __name__ == "__main__": action='store_true', help='enable experimental tests') parser.add_option("--timeout", - default=5400, + default=None, type='int', help='maximum runtime in seconds') parser.add_option("--frame", @@ -898,6 +898,14 @@ if __name__ == "__main__": opts, args = parser.parse_args() + if opts.timeout is None: + opts.timeout = 5400 + # adjust if we're running in a regime which may slow us down e.g. Valgrind + if opts.valgrind: + opts.timeout *= 10 + elif opts.gdb: + opts.timeout = None + steps = [ 'prerequisites', 'build.Binaries', @@ -1007,7 +1015,8 @@ if __name__ == "__main__": # ensure we catch timeouts signal.signal(signal.SIGALRM, alarm_handler) - signal.alarm(opts.timeout) + if opts.timeout is not None: + signal.alarm(opts.timeout) if opts.list: for step in steps: