Merge remote-tracking branch 'origin/downloadtest' into debug-tests-more-single
[riscv-tests.git] / debug / gdbserver.py
index adf179da6f0ea789eaf7daa3e4b925faa4341584..be89d19157b07789be13bad5a105091b393569c5 100755 (executable)
@@ -351,9 +351,7 @@ class DebugSymbols(DebugTest):
 
 class DebugBreakpoint(DebugTest):
     def test(self):
-
         self.gdb.b("rot13")
-
         # The breakpoint should be hit exactly 2 times.
         for _ in range(2):
             output = self.gdb.c()
@@ -832,16 +830,12 @@ class DownloadTest(GdbTest):
 
         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()
-        # Some hart will get there first! Let them race in RTOS mode.
-        for hart in self.target.harts:
-            self.gdb.select_hart(hart)
-            self.gdb.p("$pc=_start")
-            self.gdb.command("b _exit")
-
+        self.parkOtherHarts()
+        self.gdb.command("b _exit")
         self.gdb.c()
         assertEqual(self.gdb.p("status"), self.crc)
         os.unlink(self.download_c.name)