diff options
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | test/docker-compose.yml | 13 | ||||
-rw-r--r-- | test/docker/Dockerfile | 8 | ||||
-rw-r--r-- | test/docker/docker-compose.yml | 8 |
4 files changed, 20 insertions, 15 deletions
@@ -36,8 +36,12 @@ test/all: test/local test/docker test/local: ./test/local/test.sh +.PHONY: test/linux-home +test/linux-home: + ./test/linux-home/test.sh + test/docker/%: DO - cd test && \ + cd test/docker && \ DISTRO='$*' docker-compose build --pull && \ docker-compose run --rm test && \ docker-compose down -v diff --git a/test/docker-compose.yml b/test/docker-compose.yml deleted file mode 100644 index 3acdef7..0000000 --- a/test/docker-compose.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: '3' -services: - test: - build: - context: docker/ - args: - DISTRO: "${DISTRO:-xenial}" - volumes: - - ../:/src - command: - - sh - - -c - - /src/test/local/test.sh && /src/test/linux-home/test.sh diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile index 5d4d016..04e66da 100644 --- a/test/docker/Dockerfile +++ b/test/docker/Dockerfile @@ -4,6 +4,12 @@ FROM ubuntu:$DISTRO RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive \ - apt-get install -y --no-install-recommends ca-certificates git + apt-get install -y --no-install-recommends ca-certificates git make RUN git config --global --add safe.directory /src + +COPY [".", "/src"] + +WORKDIR /src + +CMD ["make", "test/local", "test/linux-home"] diff --git a/test/docker/docker-compose.yml b/test/docker/docker-compose.yml new file mode 100644 index 0000000..552fadb --- /dev/null +++ b/test/docker/docker-compose.yml @@ -0,0 +1,8 @@ +version: '3' +services: + test: + build: + context: ../.. + dockerfile: test/docker/Dockerfile + args: + DISTRO: "${DISTRO:-xenial}" |