|
|
@ -11,7 +11,7 @@ from openpilot.tools.lib.logreader import LogReader |
|
|
|
from openpilot.common.run import run_cmd |
|
|
|
from openpilot.common.run import run_cmd |
|
|
|
|
|
|
|
|
|
|
|
MAX_EXAMPLES = int(os.environ.get("MAX_EXAMPLES", "2")) |
|
|
|
MAX_EXAMPLES = int(os.environ.get("MAX_EXAMPLES", "2")) |
|
|
|
TARGET_REF = os.environ.get("TARGET_REF", "") |
|
|
|
TARGET_GIT_REF = os.environ.get("TARGET_GIT_REF", "origin/master") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(scope="module") |
|
|
|
@pytest.fixture(scope="module") |
|
|
@ -19,7 +19,7 @@ def parent_schema_file(tmp_path_factory): |
|
|
|
tmp_dir = tmp_path_factory.mktemp("cereal") |
|
|
|
tmp_dir = tmp_path_factory.mktemp("cereal") |
|
|
|
|
|
|
|
|
|
|
|
# TODO this will fail if the any capnp files are added/removed vs what was on the parent commit |
|
|
|
# TODO this will fail if the any capnp files are added/removed vs what was on the parent commit |
|
|
|
commit = run_cmd(["git", "rev-parse", TARGET_REF]) if TARGET_REF else run_cmd(["git", "merge-base", "origin/master", "HEAD"]) |
|
|
|
commit = run_cmd(["git", "rev-parse", TARGET_GIT_REF]) |
|
|
|
opendbc_commit = run_cmd(["git", "ls-tree", "--object-only", commit, "opendbc_repo"]) # for car.capnp |
|
|
|
opendbc_commit = run_cmd(["git", "ls-tree", "--object-only", commit, "opendbc_repo"]) # for car.capnp |
|
|
|
for capnp_fp in glob(os.path.join(CEREAL_PATH, "**", "*.capnp"), recursive=True): |
|
|
|
for capnp_fp in glob(os.path.join(CEREAL_PATH, "**", "*.capnp"), recursive=True): |
|
|
|
fname = os.path.relpath(capnp_fp, CEREAL_PATH) |
|
|
|
fname = os.path.relpath(capnp_fp, CEREAL_PATH) |
|
|
|