This commit is contained in:
firestar5683
2026-08-24 17:06:58 -05:00
parent 6da9d3472e
commit 30c939db90
5 changed files with 19 additions and 1 deletions
+11
View File
@@ -146,6 +146,17 @@ capnproto_lib_dirs = [capnproto.LIB_DIR] if capnproto is not None else []
ffmpeg_include_dirs = [ffmpeg.INCLUDE_DIR] if ffmpeg is not None else []
ffmpeg_lib_dirs = [ffmpeg.LIB_DIR] if ffmpeg is not None else []
# The managed native-dependency packages keep their tools inside the package
# instead of installing them into /usr/local/venv/bin. cereal invokes capnpc
# directly while SConscript files are evaluated, so make the packaged tools
# discoverable to both SCons actions and configure-time subprocesses.
dependency_bin_dirs = [
package.BIN_DIR for package in (capnproto, ffmpeg)
if package is not None and os.path.isdir(package.BIN_DIR)
]
if dependency_bin_dirs:
os.environ["PATH"] = os.pathsep.join([*dependency_bin_dirs, os.environ["PATH"]])
# Homebrew llvm can shadow Apple clang and break macOS SDK header resolution.
# Use the system toolchain explicitly on macOS for reliable local builds.
cc = '/usr/bin/clang' if arch == "Darwin" else 'clang'
Binary file not shown.
Binary file not shown.
+5 -1
View File
@@ -7,7 +7,7 @@ from pathlib import Path
from openpilot.system.hardware.hw import Paths
from openpilot.common.swaglog import cloudlog
from openpilot.system.loggerd.uploader import main, UPLOAD_ATTR_NAME, UPLOAD_ATTR_VALUE
from openpilot.system.loggerd.uploader import clear_locks, main, UPLOAD_ATTR_NAME, UPLOAD_ATTR_VALUE
from openpilot.system.loggerd.xattr_cache import getxattr
from openpilot.system.loggerd.tests.loggerd_tests_common import UploaderTestCase
@@ -36,6 +36,10 @@ log_handler = FakeLogHandler()
cloudlog.addHandler(log_handler)
def test_clear_locks_missing_root(tmp_path):
clear_locks(str(tmp_path / "missing"))
class TestUploader(UploaderTestCase):
def setup_method(self):
super().setup_method()
+3
View File
@@ -63,6 +63,9 @@ def listdir_by_creation(d: str) -> list[str]:
return []
def clear_locks(root: str) -> None:
if not os.path.isdir(root):
return
for logdir in os.listdir(root):
path = os.path.join(root, logdir)
try: