X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=debug%2Ftestlib.py;h=86095e38c8fc88cd4f4889f2deb904c3adbd8801;hb=e341f6ceb8f2de55c60a56ce36ab5b021d569457;hp=ecb0431e128e5d3941245821c5a275f4eaabe899;hpb=e73b73034d706cf52b499b1e69c69e3da3925e6d;p=riscv-tests.git diff --git a/debug/testlib.py b/debug/testlib.py index ecb0431..86095e3 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -74,6 +74,8 @@ class Spike(object): if timeout: cmd = ["timeout", str(timeout)] + cmd + cmd += ["-m0x10000000:0x10000000"] + if halted: cmd.append('-H') if with_jtag_gdb: @@ -368,7 +370,12 @@ def run_all_tests(module, target, parsed): global gdb_cmd # pylint: disable=global-statement gdb_cmd = parsed.gdb - todo = [("ExamineTarget", ExamineTarget)] + todo = [] + if (parsed.misa): + self.target.misa = parsed.misa + else: + todo.append(("ExamineTarget", ExamineTarget)) + for name in dir(module): definition = getattr(module, name) if type(definition) == type and hasattr(definition, 'test') and \ @@ -402,6 +409,8 @@ def add_test_run_options(parser): help="Run only tests that are named here.") parser.add_argument("--gdb", help="The command to use to start gdb.") + parser.add_argument("--misa", "-m", + help="Don't run ExamineTarget, just assume the misa which is specified.") def header(title, dash='-'): if title: