Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run_all.py script fixes #2519

Merged
merged 2 commits into from
Jun 27, 2023
Merged
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
16 changes: 14 additions & 2 deletions scripts/run_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
EXTRA_ARGS = {
"examples/python/clock": ["--steps=200"], # Make it faster
"examples/python/live_camera_edge_detection": ["--num-frames=30"], # Make sure it finishes
"examples/python/face_tracking": ["--max-frame=30"], # Make sure it finishes
}

HAS_NO_SAVE_ARG = {
"examples/python/multiprocessing",
"examples/python/minimal",
"examples/python/dna",
"examples/python/blueprint",
}


Expand Down Expand Up @@ -45,6 +53,9 @@ def run_py_example(path: str, viewer_port: int | None = None, wait: bool = True,
if viewer_port is not None:
args += ["--connect", f"--addr=127.0.0.1:{viewer_port}"]

cmd = " ".join(f'"{a}"' if " " in a else a for a in args)
print(f"Running example '{path}' via '{cmd}'")

return start_process(
args,
cwd=path,
Expand Down Expand Up @@ -204,8 +215,9 @@ def run_web(examples: list[str], separate: bool) -> None:

def run_save(examples: list[str]) -> None:
for path in examples:
example = run_py_example(path, save="out.rrd")
print_example_output(path, example)
if path not in HAS_NO_SAVE_ARG:
example = run_py_example(path, save="out.rrd")
print_example_output(path, example)


def run_load(examples: list[str], separate: bool, close: bool) -> None:
Expand Down
Loading