Skip to content

Commit

Permalink
Use docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
reemo3dp committed Aug 13, 2024
1 parent 95365c4 commit 8efc9c3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/klipper_tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ set -euxo pipefail
trap destroy EXIT

destroy() {
docker-compose down -t0 || true
docker compose down -t0 || true
}

run() {
docker-compose up -d
docker-compose exec -T klipper bash -c '
docker compose up -d
docker compose exec -T klipper bash -c '
cd /app
./install-led_effect.sh --no-moonraker --no-service -k /opt/klipper/ --venv /opt/venv/
exit 0
';
docker-compose exec -T klipper bash -c '
docker compose exec -T klipper bash -c '
cd /opt
/opt/venv/bin/python klipper/klippy/klippy.py \
-v \
Expand All @@ -28,14 +28,14 @@ run() {
set +e
# shellcheck disable=SC2034
for i in {1..100}; do
INFO=$(docker-compose exec -T moonraker curl http://localhost:7125/printer/info)
INFO=$(docker compose exec -T moonraker curl http://localhost:7125/printer/info)
# shellcheck disable=SC2181
if [ $? -ne 0 ]; then
sleep 1s
continue;
fi

docker-compose exec -T klipper bash -c 'cat printer_data/logs/klippy.log'
docker compose exec -T klipper bash -c 'cat printer_data/logs/klippy.log'
if [[ "$INFO" =~ \"state\":\ *\"ready\" ]]; then
exit 0
fi
Expand Down

0 comments on commit 8efc9c3

Please sign in to comment.