Merge remote-tracking branch 'origin/downloadtest' into debug-tests-more-single
[riscv-tests.git] / debug / testlib.py
index 09baf1bec6bb522fb7d85631f2112c61dd1270de..fb5bee33b1284b36ecafe918821a979ad1cf738c 100644 (file)
@@ -861,10 +861,8 @@ class GdbTest(BaseTest):
         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:
@@ -873,6 +871,11 @@ class GdbSingleHartTest(GdbTest):
 
         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: