diff --git a/runtests.py b/runtests.py index 3f49107f3ce0..ff79befc4e52 100755 --- a/runtests.py +++ b/runtests.py @@ -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, @@ -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) @@ -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."