Skip to content

Commit 4b88f42

Browse files
authored
Merge pull request #479 from riscv-software-src/debug_timeout
Add --target-timeout to debug test script.
2 parents 784c89e + 3cc8c85 commit 4b88f42

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

debug/testlib.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

11041108
def header(title, dash='-', length=78):
11051109
if title:
@@ -1242,6 +1246,7 @@ def run(self):
12421246
return result
12431247

12441248
gdb_cmd = None
1249+
target_timeout = None
12451250
class 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

Comments
 (0)