Increase "load" timeout.
[riscv-tests.git] / debug / testlib.py
index f8c8062f2b9c05d9416d90099d3e84611924b2d8..e749a1a7919bbf2827559e098fc187657ee7aa69 100644 (file)
@@ -102,8 +102,8 @@ class Openocd(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.wait()
@@ -153,7 +153,7 @@ class Gdb(object):
         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
 
@@ -166,5 +166,5 @@ class Gdb(object):
     def hbreak(self, location):
         output = self.command("hbreak %s" % location)
         assert "not defined" not in output
-        assert "Breakpoint" in output
+        assert "Hardware assisted breakpoint" in output
         return output