mirror of
https://github.com/YosysHQ/sby.git
synced 2026-07-30 16:14:01 +00:00
tests: Support .skip file
SBY entires in a file named `.skip` are ignored from the current directory during collection. Useful for when you want to skip a file, but don't want to use the `skip_` prefix, such as when it's a docs example.
This commit is contained in:
parent
62cd0028a0
commit
0bfda86687
1 changed files with 11 additions and 0 deletions
|
|
@ -40,6 +40,15 @@ def collect(path):
|
|||
):
|
||||
return
|
||||
|
||||
skip_files = []
|
||||
try:
|
||||
with open(path / ".skip", "r") as f:
|
||||
for line in f:
|
||||
skip_files.append(line.rstrip())
|
||||
except FileNotFoundError:
|
||||
# no .skip file
|
||||
pass
|
||||
|
||||
checked_dirs.append(path)
|
||||
for entry in path.glob("*.sby"):
|
||||
filename = str(entry)
|
||||
|
|
@ -50,6 +59,8 @@ def collect(path):
|
|||
continue
|
||||
if entry.with_suffix(".ivy").exists():
|
||||
continue
|
||||
if entry.stem in skip_files:
|
||||
continue
|
||||
tests.append(entry)
|
||||
for entry in path.glob("*"):
|
||||
if entry.with_suffix(".sby").exists():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue