panda/tests/ci_shell.sh

22 lines
538 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
set -e
2021-06-10 09:36:07 +08:00
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
OP_ROOT="$DIR/../../"
PANDA_ROOT="$DIR/../"
2021-06-10 09:36:07 +08:00
if [ -z "$BUILD" ]; then
docker pull docker.io/commaai/panda:latest
else
docker build --cache-from docker.io/commaai/panda:latest -t docker.io/commaai/panda:latest -f $PANDA_ROOT/Dockerfile $PANDA_ROOT
2021-06-10 09:36:07 +08:00
fi
docker run \
-it \
--rm \
--volume $OP_ROOT:$OP_ROOT \
--workdir $PWD \
--env PYTHONPATH=$OP_ROOT \
docker.io/commaai/panda:latest \
/bin/bash