diff options
| author | Tim Newsome <tim@sifive.com> | 2017-06-05 11:46:39 -0700 |
|---|---|---|
| committer | Tim Newsome <tim@sifive.com> | 2017-06-05 11:46:39 -0700 |
| commit | 12b8a1a45d62c00cc4f1bc9d6d44948352c9615f (patch) | |
| tree | 9035cf3447594a7159ca7736212793fc9caf2776 /debug/testlib.py | |
| parent | a9433c4daa287fbe101025f2a079261a10149225 (diff) | |
| download | riscv-tests-12b8a1a45d62c00cc4f1bc9d6d44948352c9615f.zip riscv-tests-12b8a1a45d62c00cc4f1bc9d6d44948352c9615f.tar.gz riscv-tests-12b8a1a45d62c00cc4f1bc9d6d44948352c9615f.tar.bz2 | |
Make pylint happy.
If we want we can start using print(), but if so let's consistently use
it instead of piecemeal. See also
https://stackoverflow.com/questions/28694380/pylint-says-unnecessary-parens-after-r-keyword
Diffstat (limited to 'debug/testlib.py')
| -rw-r--r-- | debug/testlib.py | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/debug/testlib.py b/debug/testlib.py index 3d08e9b..8855e24 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -21,12 +21,12 @@ def find_file(path): def compile(args, xlen=32): # pylint: disable=redefined-builtin cc = os.path.expandvars("$RISCV/bin/riscv64-unknown-elf-gcc") cmd = [cc, "-g"] - if (xlen == 32): + if xlen == 32: cmd.append("-march=rv32imac") cmd.append("-mabi=ilp32") else: cmd.append("-march=rv64imac") - cmd.append("-mabi=lp64") + cmd.append("-mabi=lp64") for arg in args: found = find_file(arg) if found: @@ -163,9 +163,9 @@ class Openocd(object): else: openocd = os.path.expandvars("$RISCV/bin/riscv-openocd") cmd = [openocd] - if (debug): + if debug: cmd.append("-d") - + # This command needs to come before any config scripts on the command # line, since they are executed in order. cmd += [ @@ -184,7 +184,7 @@ class Openocd(object): if config: f = find_file(config) if f is None: - print("Unable to read file " + config) + print "Unable to read file " + config exit(1) cmd += ["-f", f] @@ -377,9 +377,10 @@ def run_all_tests(module, target, parsed): gdb_cmd = parsed.gdb todo = [] - if (parsed.misaval): + if parsed.misaval: target.misa = int(parsed.misaval, 16) - print "Assuming $MISA value of 0x%x. Skipping ExamineTarget." % target.misa + print "Assuming $MISA value of 0x%x. Skipping ExamineTarget." % \ + target.misa else: todo.append(("ExamineTarget", ExamineTarget)) @@ -418,7 +419,8 @@ def add_test_run_options(parser): parser.add_argument("--gdb", help="The command to use to start gdb.") parser.add_argument("--misaval", - help="Don't run ExamineTarget, just assume the misa value which is specified.") + help="Don't run ExamineTarget, just assume the misa value which is " + "specified.") def header(title, dash='-'): if title: |
