Project

General

Profile

Actions

action #45215

closed

"docker-test" vs. "docker-tests"

Added by okurz almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2018-09-12
Due date:
% Done:

0%

Estimated time:

Description

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)?


Related issues 1 (0 open1 closed)

Copied from openQA Project - 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)Resolvedokurz2018-09-12

Actions
Actions #1

Updated by okurz almost 6 years ago

  • 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
Actions #2

Updated by mkittler almost 6 years ago

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.

Actions #3

Updated by mkittler almost 6 years ago

  • Assignee set to mkittler
  • Target version set to Current Sprint
Actions #4

Updated by mkittler almost 6 years ago

  • 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.

Actions #5

Updated by mkittler almost 6 years 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.

Actions #6

Updated by okurz almost 6 years ago

well, the last aspect is handled by https://github.com/os-autoinst/openQA/pull/1931 . I have realized the same

Actions #7

Updated by mkittler almost 6 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF