Skip to content

Commit

Permalink
Merge pull request #497 from riscv-software-src/unavailable
Browse files Browse the repository at this point in the history
debug: Re-enable unavailable tests, and fix them for github
  • Loading branch information
timsifive authored Jul 24, 2023
2 parents 985acb5 + 83425c3 commit d4eaa5b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions debug/gdbserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1816,10 +1816,9 @@ class UnavailableMultiTest(GdbTest):
"-DDEFINE_FREE")

def early_applicable(self):
return False # This test fails in github workflows
#return (self.hart.support_cease or
# self.target.support_unavailable_control) \
# and len(self.target.harts) > 1
return (self.hart.support_cease or
self.target.support_unavailable_control) \
and len(self.target.harts) > 1

def setup(self):
ProgramTest.setup(self)
Expand Down Expand Up @@ -1886,9 +1885,8 @@ class UnavailableRunTest(ProgramTest):
"""Test that we work correctly when the hart we're debugging ceases to
respond."""
def early_applicable(self):
return False # This test fails in github workflows
#return self.hart.support_cease or \
# self.target.support_unavailable_control
return self.hart.support_cease or \
self.target.support_unavailable_control

def test(self):
self.gdb.b("main")
Expand Down Expand Up @@ -1924,8 +1922,7 @@ class UnavailableCycleTest(ProgramTest):
"""Test that harts can be debugged after becoming temporarily
unavailable."""
def early_applicable(self):
return False # This test fails in github workflows
#return self.target.support_unavailable_control
return self.target.support_unavailable_control

def test(self):
self.gdb.b("main")
Expand Down
2 changes: 1 addition & 1 deletion debug/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ def command(self, cmd):
self.command_count += 1
self.process.stdin.write(magic + b"\n")
self.process.stdin.flush()
m = self.expect(rb"(.*)^> " + re.escape(magic))
m = self.expect(rb"(.*)^>\s*" + re.escape(magic))
return m.group(1)

def expect(self, regex, message=None):
Expand Down

0 comments on commit d4eaa5b

Please sign in to comment.