action #45215
closed
- Copied from action #40901: make Makefile targets for tests easier (was: make target "docker.env" fails, probably grep -E 'FULLSTACK|UITEST|GH|TRAVIS|CPAN|DEBUG|ZYPPER' returns nothing for me) added
I'm also just a user of the docker rules and it confuses me every time again when I attempt to use them.
I only use docker-tests
and docker-test-build
. Travis seems to use docker-test
.
- Assignee set to mkittler
- Target version set to Current Sprint
- Status changed from New to In Progress
I suppose I found out the difference between docker-tests
(1) and docker-test
(2).
(1) is supposed to run inside the docker container in order to run the entire test suite. It does some special preparation for running the full-stack test (e.g. getting os-autoinst).
(2) is supposed to launch the Docker container itself (docker run ...
). This is used to start the container within Travis. Maybe some developers use it, too. I personally use a self-crafted script for docker run ...
which is the reason I wasn't aware of it.
So (1) is for docker stuff inside the container and (2) for docker stuff outside. The targets are therefore not redundant. We could improve the names of course. E.g. (1) could be run-tests-within-docker
and (2) launch-docker-container-and-run-tests-inside
. Maybe someone else has better ideas for the names? The targets should definitely be documented better so that's what I'm going to do to resolve the ticket. If someone comes up with good names for the targets I can also rename them.
It also seems that the Makefile targets require improvement in general. We have for example:
.PHONY: docker-test-run
docker-test-run:
docker run --rm -v $(abs_top_srcdir):/opt/repo os-autoinst/travis_test:latest 'make && make check VERBOSE=1'
.PHONY: docker-test
docker-test: docker-test-build docker-test-run
echo "Use docker-rm and docker-rmi to remove the container and image if necessary"
That makes no sense. docker run ...
depends on docker-test-build
so the targets must run in sequence. However, using make -j2 docker-test
would execute them in parallel.
- Status changed from In Progress to Resolved
Also available in: Atom
PDF