Skip to content

Commit 2dc2643

Browse files
committed
Make it possible to run only a specific type checker
1 parent edba79d commit 2dc2643

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

conformance/src/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@ def main():
260260

261261
# Run each test case with each type checker.
262262
for type_checker in TYPE_CHECKERS:
263+
if options.only_run and options.only_run != type_checker.name:
264+
continue
263265
if not type_checker.install():
264266
print(f"Skipping tests for {type_checker.name}")
265267
else:

conformance/src/options.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
import argparse
66
from dataclasses import dataclass
77

8+
from type_checker import TYPE_CHECKERS
89

910
@dataclass
1011
class _Options:
1112
report_only: bool | None
13+
only_run: str | None
1214

1315

1416
def parse_options(argv: list[str]) -> _Options:
@@ -19,5 +21,10 @@ def parse_options(argv: list[str]) -> _Options:
1921
action="store_true",
2022
help="regenerates the test suite report from past results",
2123
)
24+
reporting_group.add_argument(
25+
"--only-run",
26+
help="Only runs the type checker",
27+
choices=[tc.name for tc in TYPE_CHECKERS]
28+
)
2229
ret = _Options(**vars(parser.parse_args(argv)))
2330
return ret

0 commit comments

Comments
 (0)