"docker-test" vs. "docker-tests"
Within https://github.com/os-autoinst/openQA/blob/master/Makefile we have two make targets "docker-test" and "docker-tests". Both have been introduced within the last 8 months and a bit competing, at least confusing. Can we improve that? Maybe there is some redundancy? Maybe we can just rename the targets (and script)?
#4 Updated by mkittler over 1 year ago
- Status changed from New to In Progress
I suppose I found out the difference between
docker-tests (1) and
(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.
#5 Updated by mkittler over 1 year ago
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.