projects
/
riscv-tests.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Turn off debugging.
[riscv-tests.git]
/
debug
/
testlib.py
diff --git
a/debug/testlib.py
b/debug/testlib.py
index 53e670ec51c006fa96cbb0ea2f201e5f77fb7f7c..3339e9b49a88afaf22538f7029ce5e87c48577aa 100644
(file)
--- a/
debug/testlib.py
+++ b/
debug/testlib.py
@@
-79,7
+79,7
@@
class Spike(object):
return self.process.wait(*args, **kwargs)
class Openocd(object):
return self.process.wait(*args, **kwargs)
class Openocd(object):
- def __init__(self, cmd=None, config=None, debug=
Tru
e):
+ def __init__(self, cmd=None, config=None, debug=
Fals
e):
if cmd:
cmd = shlex.split(cmd)
else:
if cmd:
cmd = shlex.split(cmd)
else:
@@
-89,6
+89,7
@@
class Openocd(object):
if debug:
cmd.append("-d")
logfile = open("openocd.log", "w")
if debug:
cmd.append("-d")
logfile = open("openocd.log", "w")
+ logfile.write("+ %s\n" % " ".join(cmd))
self.process = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=logfile,
stderr=logfile)
# TODO: Pick a random port
self.process = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=logfile,
stderr=logfile)
# TODO: Pick a random port
@@
-102,10
+103,11
@@
class Openocd(object):
pass
class Gdb(object):
pass
class Gdb(object):
- def __init__(self
):
- path = os.path.expandvars("$RISCV/bin/riscv64-unknown-elf-gdb")
+ def __init__(self
,
+ path=os.path.expandvars("$RISCV/bin/riscv64-unknown-elf-gdb")):
self.child = pexpect.spawn(path)
self.child.logfile = file("gdb.log", "w")
self.child = pexpect.spawn(path)
self.child.logfile = file("gdb.log", "w")
+ self.child.logfile.write("+ %s\n" % path)
self.wait()
self.command("set confirm off")
self.command("set width 0")
self.wait()
self.command("set confirm off")
self.command("set width 0")
@@
-153,7
+155,7
@@
class Gdb(object):
return output
def load(self):
return output
def load(self):
- output = self.command("load")
+ output = self.command("load"
, timeout=60
)
assert "failed" not in output
assert "Transfer rate" in output
assert "failed" not in output
assert "Transfer rate" in output