Skip to content
Open
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
20 changes: 7 additions & 13 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,17 @@
# These mypyc test filters cover most slow test cases
MYPYC_SLOW = [MYPYC_RUN_MULTI, MYPYC_COMMAND_LINE, MYPYC_SEPARATE, MYPYC_MULTIMODULE]

self_args = ["--config-file", "mypy_self_check.ini", "-p", "mypy", "-p", "mypyc"]

# We split the pytest run into three parts to improve test
# parallelization. Each run should have tests that each take a roughly similar
# time to run.
cmds = {
# Self type check
"self": [
executable,
"-m",
"mypy",
"--config-file",
"mypy_self_check.ini",
"-p",
"mypy",
"-p",
"mypyc",
],
"self": [executable, "-m", "mypy"] + self_args,
# Self type check, but use mypyc;
# for instance, to catch nasty mypyc bugs.
"selfc": ["mypyc"] + self_args,
# Type check setup.py as well
"self-packaging": [
executable,
Expand Down Expand Up @@ -103,7 +97,7 @@
# Stop run immediately if these commands fail
FAST_FAIL = ["self", "lint"]

EXTRA_COMMANDS = ("pytest-extra", "mypyc-fast", "mypyc-extra")
EXTRA_COMMANDS = ("pytest-extra", "mypyc-fast", "mypyc-extra", "selfc")
DEFAULT_COMMANDS = [cmd for cmd in cmds if cmd not in EXTRA_COMMANDS]

assert all(cmd in cmds for cmd in FAST_FAIL)
Expand Down Expand Up @@ -159,7 +153,7 @@ def main() -> None:
print()
print(
"Run the given tests. If given no arguments, run everything except"
+ " pytest-extra and mypyc-extra. Unrecognized arguments will be"
+ f" the slowest commands {EXTRA_COMMANDS}. Unrecognized arguments will be"
+ " interpreted as individual test names / substring expressions"
+ " (or, if they end in .test, individual test files)"
+ " and this script will try to run them."
Expand Down
Loading