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

Fix e2e test on CI: Don't try to re-build rerun-sdk #1821

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
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
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