diff options
Diffstat (limited to 'check')
-rwxr-xr-x | check | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -13,9 +13,10 @@ from subprocess import PIPE, DEVNULL, STDOUT class Runcmd: """Run external commands in various ways""" - def __init__(self, verbose, progress): + def __init__(self, verbose, progress, offline): self._verbose = verbose self._progress = progress + self.offline = offline # Deliberately chosen because it's 12:45 / 13:45 offset from UTC # As such it ought to show any TZ related errors if we're lucky. self._env = {"TZ": "NZ-CHAT"} @@ -267,6 +268,8 @@ def check_subplots(r): "**/*.subplot", lambda f: f == f.lower() and "subplotlib" not in f and "test-outputs" not in f, ) + if r.offline: + subplots = [s for s in subplots if s != "reference.subplot"] for subplot0 in subplots: r.title(f"checking subplot {subplot0}") @@ -364,6 +367,9 @@ def parse_args(): p.add_argument( "--sloppy", action="store_true", help="don't check formatting or with clippy" ) + p.add_argument( + "--offline", action="store_true", help="only run tests that can be run offline" + ) all_whats = ["tooling", "python", "shell", "rust", "subplots"] p.add_argument( @@ -386,7 +392,7 @@ def main(): """Main program""" args = parse_args() - r = Runcmd(args.verbose, args.progress) + r = Runcmd(args.verbose, args.progress, args.offline) r.setenv("PYTHONDONTWRITEBYTECODE", "1") for what in args.what: |