diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 70a92fbd78e7..2635be7ba45b 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -217,7 +217,7 @@ jobs: run: cd rerun_py/tests && pytest - name: Run e2e test - run: scripts/run_python_e2e_test.py + run: scripts/run_python_e2e_test.py --no-build # rerun-sdk is already built and installed - name: Unpack the wheel shell: bash diff --git a/scripts/run_python_e2e_test.py b/scripts/run_python_e2e_test.py index 2a67f656a98e..78c03ed9c7e4 100755 --- a/scripts/run_python_e2e_test.py +++ b/scripts/run_python_e2e_test.py @@ -11,6 +11,7 @@ * Data store ingestion """ +import argparse import os import subprocess import sys @@ -18,17 +19,23 @@ def main() -> None: - build_env = os.environ.copy() - if "RUST_LOG" in build_env: - del build_env["RUST_LOG"] # The user likely only meant it for the actual tests; not the setup - - print("----------------------------------------------------------") - print("Building rerun-sdk…") - start_time = time.time() - subprocess.Popen(["just", "py-build", "--quiet"], env=build_env).wait() - elapsed = time.time() - start_time - print(f"rerun-sdk built in {elapsed:.1f} seconds") - print("") + parser = argparse.ArgumentParser(description="Logs Objectron data using the Rerun SDK.") + parser.add_argument("--no-build", action="store_true", help="Skip building rerun-sdk") + + if parser.parse_args().no_build: + print("Skipping building rerun-sdk - assuming it is already built and up-to-date!") + else: + build_env = os.environ.copy() + if "RUST_LOG" in build_env: + del build_env["RUST_LOG"] # The user likely only meant it for the actual tests; not the setup + + print("----------------------------------------------------------") + print("Building rerun-sdk…") + start_time = time.time() + subprocess.Popen(["just", "py-build", "--quiet"], env=build_env).wait() + elapsed = time.time() - start_time + print(f"rerun-sdk built in {elapsed:.1f} seconds") + print("") examples = [ # Trivial examples that don't require weird dependencies, or downloading data