action #40901
closedmake 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)
0%
Description
When trying to call the local tests with docker the make target "docker.env" fails
make docker-test-run
env | grep -E 'FULLSTACK|UITEST|GH|TRAVIS|CPAN|DEBUG|ZYPPER' > "/home/okurz/local/os-autoinst/openQA/docker.env"
make: *** [Makefile:130: docker.env] Error 1
Updated by EDiGiacinto over 6 years ago
Sorry you run into this, we are in the middle of making tests more reliable / redefining our workflow. Can you confirm that the same happens when e.g. you enable specific subset of tests to be run?
UITESTS=1 make docker-test
or, any other test matrix?
Updated by coolo over 6 years ago
the question is basically: what tests did you expect to run? all of them?
Updated by mkittler over 6 years ago
I've also ran into this issue (it aborts before running anything).
Here I documented what works for me: https://github.com/os-autoinst/openQA/blob/master/docs/Contributing.asciidoc#how-to-run-tests-with-docker work. Note the exact docker pull
line and make docker-test-build
before make docker-test-run
. Does it work when running the command manually?
Updated by EDiGiacinto over 6 years ago
the original intention with the docker-test target was to not have to run all those commands before running the actual test (as it should also pull the docker image) and the others are shortcuts to do things manually in case the automatic one fails.
Updated by okurz over 6 years ago
UITESTS=1 make docker-test
works as it builds the docker image(s) and executes the UI testsmake docker-test
builds again but does not execute any tests:
$ make docker-test
docker build --no-cache /home/okurz/local/os-autoinst/openQA/docker/openqa -t openqa:latest
…
Successfully built 0c2d773f3229
Successfully tagged openqa:latest
env | grep -E 'FULLSTACK|UITEST|GH|TRAVIS|CPAN|DEBUG|ZYPPER' > "/home/okurz/local/os-autoinst/openQA/docker.env"
make: *** [Makefile:130: docker.env] Error 1
make docker-test-run
obviously skips the building and reproduces the last step failing
Yes, I expected it to run all tests or at least a "standard set" as the documentation https://github.com/os-autoinst/openQA/blob/master/docs/Contributing.asciidoc#how-to-run-tests-with-docker mentions this command.
Updated by okurz about 6 years ago
- Copied to action #45215: "docker-test" vs. "docker-tests" added
Updated by okurz over 5 years ago
- Subject changed from make target "docker.env" fails, probably grep -E 'FULLSTACK|UITEST|GH|TRAVIS|CPAN|DEBUG|ZYPPER' returns nothing for me to 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)
- Category changed from Support to Feature requests
Updated by okurz almost 5 years ago
- Status changed from New to Resolved
- Assignee set to okurz
done. After the move from travisci to circleci I cleaned up the Makefile and supporting scripts a lot and now
- make test
just works, setting up everything that is needed to run tests locally without containers again though running tests within containers is still supported though not automatically tested anymore as circleci handles containers by itself hence we also do not spawn the containers with our instructions.
We also have convenience targets, e.g.
- make test-t
- make test-fullstack
- make test-ui
- make test-checkstyle
etc.