X-Git-Url: https://git.libre-soc.org/?p=riscv-tests.git;a=blobdiff_plain;f=debug%2Ftestlib.py;h=fb5bee33b1284b36ecafe918821a979ad1cf738c;hp=09baf1bec6bb522fb7d85631f2112c61dd1270de;hb=bd8f01b7942177911208fff916492ad4539638fb;hpb=fc661cde26cfc3e07e74310ff73e1affaf047fd9 diff --git a/debug/testlib.py b/debug/testlib.py index 09baf1b..fb5bee3 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -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: