1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-11-22 00:02:28 +00:00

Updated makefiles from senpy

Use the current build version in tests.
Tests will be slower (they require a build), but they will always contain the
latest dockerfile changes.
This commit is contained in:
J. Fernando Sánchez 2018-01-08 00:44:40 +01:00
parent 1087692de2
commit a951696317

View File

@ -28,7 +28,7 @@ quick_build: $(addprefix build-, $(PYMAIN))
build: $(addprefix build-, $(PYVERSIONS)) ## Build all images / python versions build: $(addprefix build-, $(PYVERSIONS)) ## Build all images / python versions
build-%: version Dockerfile-% ## Build a specific version (e.g. build-2.7) build-%: version Dockerfile-% ## Build a specific version (e.g. build-2.7)
docker build -t '$(IMAGEWTAG)-python$*' --cache-from $(IMAGENAME):python$* -f Dockerfile-$* .; docker build -t '$(IMAGEWTAG)-python$*' -f Dockerfile-$* .;
dev-%: ## Launch a specific development environment using docker (e.g. dev-2.7) dev-%: ## Launch a specific development environment using docker (e.g. dev-2.7)
@docker start $(NAME)-dev$* || (\ @docker start $(NAME)-dev$* || (\
@ -42,10 +42,10 @@ dev: dev-$(PYMAIN) ## Launch a development environment using docker, using the d
quick_test: test-$(PYMAIN) quick_test: test-$(PYMAIN)
test-%: ## Run setup.py from in an isolated container, built from the base image. (e.g. test-2.7) test-%: build-% ## Run setup.py from in an isolated container, built from the base image. (e.g. test-2.7)
# This speeds tests up because the image has most (if not all) of the dependencies already. # This speeds tests up because the image has most (if not all) of the dependencies already.
docker rm $(NAME)-test-$* || true docker rm $(NAME)-test-$* || true
docker create -ti --name $(NAME)-test-$* --entrypoint="" -w /usr/src/app/ $(IMAGENAME):python$* python setup.py test docker create -ti --name $(NAME)-test-$* --entrypoint="" -w /usr/src/app/ $(IMAGEWTAG)-python$* python setup.py test
docker cp . $(NAME)-test-$*:/usr/src/app docker cp . $(NAME)-test-$*:/usr/src/app
docker start -a $(NAME)-test-$* docker start -a $(NAME)-test-$*