@@ -997,6 +997,8 @@ def run_all_tests(module, target, parsed):
997997 gdb_cmd = parsed .gdb
998998 global gcc_cmd # pylint: disable=global-statement
999999 gcc_cmd = parsed .gcc
1000+ global target_timeout # pylint: disable=global-statement
1001+ target_timeout = parsed .target_timeout
10001002
10011003 examine_added = False
10021004 for hart in target .harts :
@@ -1100,6 +1102,8 @@ def add_test_run_options(parser):
11001102 "specified." )
11011103 parser .add_argument ("--exclude-tests" ,
11021104 help = "Specify yaml file listing tests to exclude" )
1105+ parser .add_argument ("--target-timeout" ,
1106+ help = "Override the base target timeout." , default = None , type = int )
11031107
11041108def header (title , dash = '-' , length = 78 ):
11051109 if title :
@@ -1242,6 +1246,7 @@ def run(self):
12421246 return result
12431247
12441248gdb_cmd = None
1249+ target_timeout = None
12451250class GdbTest (BaseTest ):
12461251 def __init__ (self , target , hart = None ):
12471252 BaseTest .__init__ (self , target , hart = hart )
@@ -1257,7 +1262,8 @@ def classSetup(self):
12571262 BaseTest .classSetup (self )
12581263
12591264 self .gdb = Gdb (self .target , self .server .gdb_ports , cmd = gdb_cmd ,
1260- timeout = self .target .timeout_sec , binaries = self .binaries )
1265+ timeout = target_timeout or self .target .timeout_sec ,
1266+ binaries = self .binaries )
12611267
12621268 self .logs += self .gdb .lognames ()
12631269 self .gdb .connect ()
0 commit comments