Skip to content

Commit

Permalink
Merge pull request #496 from riscv-software-src/pylint_workflow
Browse files Browse the repository at this point in the history
debug: Only run pylint if debug files changed.
  • Loading branch information
timsifive authored Jul 20, 2023
2 parents 0ab6b90 + 49ea593 commit 81f5ad4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
on: pull_request
on:
pull_request:
paths:
- 'debug/**'

name: Check Code Style (checkpatch)
name: Check Debug Code Style (pylint)

jobs:
check:
Expand Down
7 changes: 4 additions & 3 deletions debug/gdbserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,7 @@ def test(self):
# assertIn("0xbead", output)

class PrivTest(GdbSingleHartTest):
"""Base class for a few tests that change privilege levels."""
compile_args = ("programs/priv.S", )
def setup(self):
# pylint: disable=attribute-defined-outside-init
Expand All @@ -1588,8 +1589,8 @@ def setup(self):
pass

class PrivRw(PrivTest):
"""Test reading/writing priv."""
def test(self):
"""Test reading/writing priv."""
self.write_nop_program(4)
for privilege in range(4):
self.gdb.p(f"$priv={privilege}")
Expand All @@ -1600,9 +1601,9 @@ def test(self):
assertEqual(actual, privilege)

class PrivChange(PrivTest):
"""Test that the core's privilege level actually changes when the debugger
writes it."""
def test(self):
"""Test that the core's privilege level actually changes."""

if 0 not in self.supported:
raise TestNotApplicable

Expand Down

0 comments on commit 81f5ad4

Please sign in to comment.