Skip to content
Merged
7 changes: 5 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ export TEST_DIR=${env.TEST_DIR}
export SOURCE_DIR=${env.SOURCE_DIR}
export GIT_BRANCH=${env.GIT_BRANCH}
export GIT_COMMIT=${env.GIT_COMMIT}
export PYTHONPATH=${env.TEST_DIR}/../
export PYTHONWARNINGS=error
export LOGLEVEL=debug
ln -sf /data/openpilot/opendbc_repo/opendbc /data/opendbc

unset PYTHONPATH
if [ -f "${env.TEST_DIR}/.venv/bin/activate" ]; then
source "${env.TEST_DIR}/.venv/bin/activate"
fi

# TODO: this is an agnos issue
export PYTEST_ADDOPTS="-p no:asyncio"
Expand Down
10 changes: 7 additions & 3 deletions tests/setup_device_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ sleep infinity
EOF
chmod +x $CONTINUE_PATH


# set up environment
if [ ! -d "$SOURCE_DIR" ]; then
git clone https://github.com/commaai/panda.git $SOURCE_DIR
fi
Expand All @@ -71,6 +69,12 @@ git clean -xdff
echo "git checkout done, t=$SECONDS"
du -hs $SOURCE_DIR $SOURCE_DIR/.git

rsync -a --delete $SOURCE_DIR $TEST_DIR
rsync -a --delete "$SOURCE_DIR" "$TEST_DIR"

# /usr/comma/shims/uv wraps uv in sudo, which roots the venv — use the real binary
UV=$(type -ap uv | grep -vF /usr/comma/shims | head -n1)
# use panda's environment so dependencies come from its pyproject.toml
PYTHONWARNINGS=default "$UV" sync --project "$TEST_DIR" --cache-dir="/data/uv_cache" --all-extras --upgrade-package opendbc
"$UV" cache prune --cache-dir=/data/uv_cache

echo "$TEST_DIR synced with $GIT_COMMIT, t=$SECONDS"
Loading