From f9b210c76c87d831c001cc69d7103667d0ed6a2e Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Wed, 18 Nov 2020 23:47:45 -0800 Subject: [PATCH] make the docker filesystem layout look more like the modern world --- bin/run-docker | 2 +- etc/Dockerfile | 4 ++-- etc/docker-entrypoint.sh | 18 ++++++++++-------- tests/Makefile | 2 +- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/bin/run-docker b/bin/run-docker index 944d527d..f0262197 100755 --- a/bin/run-docker +++ b/bin/run-docker @@ -48,7 +48,7 @@ docker run --rm $DOCKER_RUN_INTERACTIVE_OPTS \ --mount type=volume,source=kaleidoscope-googletest-build,destination=/kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope/testing/googletest/build,consistency=delegated \ --mount type=volume,source=kaleidoscope-build,destination=/kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope/_build,consistency=delegated \ --env ARDUINO_DIRECTORIES_DATA=/arduino-cli/data \ - --env ARDUINO_DIRECTORIES_USER=/kaleidoscope \ + --env ARDUINO_DIRECTORIES_USER=/kaleidoscope/.arduino/user/ \ kaleidoscope/docker "$*" diff --git a/etc/Dockerfile b/etc/Dockerfile index 3c38ff0a..7b6ac85a 100644 --- a/etc/Dockerfile +++ b/etc/Dockerfile @@ -20,8 +20,8 @@ COPY docker-entrypoint.sh /usr/local/bin/entrypoint VOLUME ["/kaleidoscope", \ "/kaleidoscope-src", \ "/kaleidoscope-persist", \ - "/kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope/testing/googletest/build", \ - "/kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope/_build"] + "/kaleidoscope/testing/googletest/build", \ + "/kaleidoscope/_build"] ENV KALEIDOSCOPE_TEMP_PATH "/kaleidoscope-persist/temp" diff --git a/etc/docker-entrypoint.sh b/etc/docker-entrypoint.sh index a999ece2..8303cad0 100755 --- a/etc/docker-entrypoint.sh +++ b/etc/docker-entrypoint.sh @@ -1,21 +1,23 @@ #! /bin/bash set -e -install -d /kaleidoscope/hardware/keyboardio \ - /kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope \ +install -d /kaleidoscope/ \ + /kaleidoscope/.arduino/user/hardware/keyboardio \ /kaleidoscope-persist/temp \ /kaleidoscope-persist/ccache/cache -echo "Syncing the bundle..." -tar xf /kaleidoscope-src/bundle.tar -C /kaleidoscope/hardware/keyboardio echo "Syncing Kaleidoscope..." -tar xf /kaleidoscope-src/kaleidoscope.tar -C /kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope +tar xf /kaleidoscope-src/kaleidoscope.tar -C /kaleidoscope/ + +echo "Syncing the bundle..." +tar xf /kaleidoscope-src/bundle.tar -C /kaleidoscope/.arduino/user/hardware/keyboardio + +ln -s /kaleidoscope /kaleidoscope/.arduino/user/hardware/keyboardio/avr/libraries/Kaleidoscope +ln -s /kaleidoscope /kaleidoscope/.arduino/user/hardware/keyboardio/virtual/libraries/Kaleidoscope -ln -s /kaleidoscope/hardware/keyboardio/virtual/libraries/Kaleidoscope \ - /kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope -cd /kaleidoscope/hardware/keyboardio/avr/libraries/Kaleidoscope +cd /kaleidoscope/ export ARDUINO_DIRECTORIES_DATA=/arduino-cli/data export KALEIDOSCOPE_CCACHE=1 diff --git a/tests/Makefile b/tests/Makefile index 7cec356e..dea344c1 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -25,7 +25,7 @@ generate-testcases: all: ${TESTS} run-all -run-all: +run-all: ${TESTS} @for test in ${TESTS}; do \ ${MAKE} -s -f ${top_dir}/testing/makefiles/testcase.mk -C $${test} testcase=$${test} run; \ done || exit 1