Skip to content

ezpz.testΒΆ

Entry-point helpers for the distributed smoke test fallback logic.

CLI entry point for running the distributed smoke test locally.

main() ΒΆ

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

Source code in src/ezpz/test.py
def main() -> int:
    """Run the distributed smoke test via the scheduler or ``mpirun`` fallback."""
    command = _build_test_command(sys.argv[1:])
    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)

    fallback_cmd = ["mpirun", "-np", "2", *command]
    result = subprocess.run(fallback_cmd, check=False)
    return result.returncode

Usage ExamplesΒΆ

Run the Smoke Test via mpirun FallbackΒΆ

1
2
3
4
5
6
7
import subprocess

subprocess.run([
    "python3",
    "-m",
    "ezpz.test",
])