Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug: Only run pylint if debug files changed. #496

Merged
merged 2 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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