self.binary = self.target.compile(self.hart, self.download_c.name,
"programs/checksum.c")
- self.gdb.command("file %s" % self.binary)
+ self.gdb.global_command("file %s" % self.binary)
def test(self):
self.gdb.load()
+ self.parkOtherHarts()
self.gdb.command("b _exit")
self.gdb.c()
assertEqual(self.gdb.p("status"), self.crc)
del self.gdb
BaseTest.classTeardown(self)
-class GdbSingleHartTest(GdbTest):
- def classSetup(self):
- GdbTest.classSetup(self)
-
+ def parkOtherHarts(self):
+ """Park harts besides the currently selected one in loop_forever()."""
for hart in self.target.harts:
# Park all harts that we're not using in a safe place.
if hart != self.hart:
self.gdb.p("$pc=loop_forever")
self.gdb.select_hart(self.hart)
+class GdbSingleHartTest(GdbTest):
+ def classSetup(self):
+ GdbTest.classSetup(self)
+ self.parkOtherHarts()
+
class ExamineTarget(GdbTest):
def test(self):
for hart in self.target.harts: