Skip to content

ezpz.test⚓︎

CLI entry point for running the distributed smoke test locally.

main(args=None) ⚓︎

Run the distributed smoke test via the scheduler or mpirun fallback.

Source code in src/ezpz/test.py
def main(args: Optional[List[str]] = None) -> int:
    """Run the distributed smoke test via the scheduler or ``mpirun`` fallback."""
    args = sys.argv[1:] if args is None else args
    command = _build_test_command(args)
    scheduler = get_scheduler().lower()

    if scheduler in {"pbs", "slurm"}:
        cmd_str = " ".join(shlex.quote(part) for part in command)
        # return launch(cmd_to_launch=cmd_str)
        return launch(cmd_to_launch=cmd_str)

    # fallback_cmd = ["mpirun", "-np", "2", *command]
    cmd_str = [*command, *args]
    return run(cmd_str)