Skip to content

Commit 81f5ad4

Browse files
authored
Merge pull request #496 from riscv-software-src/pylint_workflow
debug: Only run pylint if debug files changed.
2 parents 0ab6b90 + 49ea593 commit 81f5ad4

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/debug.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
on: pull_request
1+
on:
2+
pull_request:
3+
paths:
4+
- 'debug/**'
25

3-
name: Check Code Style (checkpatch)
6+
name: Check Debug Code Style (pylint)
47

58
jobs:
69
check:

debug/gdbserver.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,6 +1562,7 @@ def test(self):
15621562
# assertIn("0xbead", output)
15631563

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

15901591
class PrivRw(PrivTest):
1592+
"""Test reading/writing priv."""
15911593
def test(self):
1592-
"""Test reading/writing priv."""
15931594
self.write_nop_program(4)
15941595
for privilege in range(4):
15951596
self.gdb.p(f"$priv={privilege}")
@@ -1600,9 +1601,9 @@ def test(self):
16001601
assertEqual(actual, privilege)
16011602

16021603
class PrivChange(PrivTest):
1604+
"""Test that the core's privilege level actually changes when the debugger
1605+
writes it."""
16031606
def test(self):
1604-
"""Test that the core's privilege level actually changes."""
1605-
16061607
if 0 not in self.supported:
16071608
raise TestNotApplicable
16081609

0 commit comments

Comments
 (0)