Skip to content

Commit

Permalink
Fix e2e test on CI: Don't try to re-build rerun-sdk (#1821)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk authored Apr 12, 2023
1 parent 5da248d commit c472b07
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 18 additions & 11 deletions scripts/run_python_e2e_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,31 @@
* Data store ingestion
"""

import argparse
import os
import subprocess
import sys
import time


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
Expand Down

0 comments on commit c472b07

Please sign in to comment.