From: Megan Wachs Date: Tue, 16 May 2017 21:40:29 +0000 (-0700) Subject: debug: Allow skipping the ExamineTarget task. X-Git-Url: https://git.libre-soc.org/?p=riscv-tests.git;a=commitdiff_plain;h=d8c989dbdcc2616e928eb12f06a2c55c957a8558 debug: Allow skipping the ExamineTarget task. --- diff --git a/debug/testlib.py b/debug/testlib.py index 86095e3..9ca97da 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -371,8 +371,9 @@ def run_all_tests(module, target, parsed): gdb_cmd = parsed.gdb todo = [] - if (parsed.misa): - self.target.misa = parsed.misa + if (parsed.misaval): + target.misa = int(parsed.misaval, 16) + print "Assuming $MISA value of 0x%x. Skipping ExamineTarget." % target.misa else: todo.append(("ExamineTarget", ExamineTarget)) @@ -402,15 +403,19 @@ def run_all_tests(module, target, parsed): return result +def auto_int (x) : + return int(x, 0) + def add_test_run_options(parser): + parser.add_argument("--fail-fast", "-f", action="store_true", help="Exit as soon as any test fails.") parser.add_argument("test", nargs='*', 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.") + parser.add_argument("--misaval", + help="Don't run ExamineTarget, just assume the misa value which is specified.") def header(title, dash='-'): if title: