diff --git a/Dockerfile.test b/Dockerfile.test new file mode 100644 index 0000000..094fb4a --- /dev/null +++ b/Dockerfile.test @@ -0,0 +1,9 @@ +FROM pumptools:build + +LABEL description="Test environment for pumptools" + +WORKDIR /pumptools + +COPY scripts/run-tests.sh scripts/run-tests.sh + +RUN make test \ No newline at end of file diff --git a/Makefile b/Makefile index dad798e..bc51d4a 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ usage: $(V)echo " clean: Clean up all build output" $(V)echo " test: Run pumptools's unit tests" $(V)echo " build-docker: Build the pumptools project in a docker container" + $(V)echo " test-docker: Run pumptools's unit tests in a docker container" $(V)echo " git-version: Generate a text file with the current git revision" $(V)echo " libc-version: Generate a text file with the libc version available" $(V)echo " clang-format: Apply code style defined in .clang-format style to all code in src/" @@ -51,6 +52,9 @@ build-docker: $(V)docker rm -f pumptools-build $(V)echo "Build output of docker build can be found in build/docker subfolder." +test-docker: + $(V)docker build -f Dockerfile.test -t pumptools:test . + # Generate a version file to identify the build git-version: $(V)mkdir -p $(BUILDDIR)