aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2023-06-29 16:04:21 -0700
committerGitHub <noreply@github.com>2023-06-29 16:04:21 -0700
commit4b88f42a109e68903b1c0f5503c02a59d8d52e71 (patch)
treeaf78879a90224f3ccd102f3eb0981a32c083a702
parent784c89ee1c4e7124a0973fda744522ebe532174b (diff)
parent3cc8c85f07cd4bf477b4bc350759e55dccae2ebd (diff)
downloadriscv-tests-4b88f42a109e68903b1c0f5503c02a59d8d52e71.zip
riscv-tests-4b88f42a109e68903b1c0f5503c02a59d8d52e71.tar.gz
riscv-tests-4b88f42a109e68903b1c0f5503c02a59d8d52e71.tar.bz2
Merge pull request #479 from riscv-software-src/debug_timeout
Add --target-timeout to debug test script.
-rw-r--r--debug/testlib.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index 1899b20..171123d 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -997,6 +997,8 @@ def run_all_tests(module, target, parsed):
gdb_cmd = parsed.gdb
global gcc_cmd # pylint: disable=global-statement
gcc_cmd = parsed.gcc
+ global target_timeout # pylint: disable=global-statement
+ target_timeout = parsed.target_timeout
examine_added = False
for hart in target.harts:
@@ -1100,6 +1102,8 @@ def add_test_run_options(parser):
"specified.")
parser.add_argument("--exclude-tests",
help="Specify yaml file listing tests to exclude")
+ parser.add_argument("--target-timeout",
+ help="Override the base target timeout.", default=None, type=int)
def header(title, dash='-', length=78):
if title:
@@ -1242,6 +1246,7 @@ class BaseTest:
return result
gdb_cmd = None
+target_timeout = None
class GdbTest(BaseTest):
def __init__(self, target, hart=None):
BaseTest.__init__(self, target, hart=hart)
@@ -1257,7 +1262,8 @@ class GdbTest(BaseTest):
BaseTest.classSetup(self)
self.gdb = Gdb(self.target, self.server.gdb_ports, cmd=gdb_cmd,
- timeout=self.target.timeout_sec, binaries=self.binaries)
+ timeout=target_timeout or self.target.timeout_sec,
+ binaries=self.binaries)
self.logs += self.gdb.lognames()
self.gdb.connect()