mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-23 05:10:24 -07:00
Fix the Makefile for integration tests not using the Python Venv (#532)
* Fix venv not being used by keeping the same shell Also fix "-set -x" command not found. * Fix missing option in the command usage documentation * Document connector-version relationship * Fix missing option in the command usage documentation * Rephrase commands descriptions * Document that you need to kill the ansible-test container yourself
This commit is contained in:
parent
9124b1f575
commit
426084a131
2 changed files with 25 additions and 17 deletions
20
Makefile
20
Makefile
|
@ -86,12 +86,20 @@ test-integration:
|
|||
while ! podman healthcheck run primary && [[ "$$SECONDS" -lt 120 ]]; do sleep 1; done
|
||||
mkdir -p .venv/$(ansible)
|
||||
python$(local_python_version) -m venv .venv/$(ansible)
|
||||
source .venv/$(ansible)/bin/activate
|
||||
python$(local_python_version) -m ensurepip
|
||||
python$(local_python_version) -m pip install --disable-pip-version-check https://github.com/ansible/ansible/archive/$(ansible).tar.gz
|
||||
-set -x; ansible-test integration $(target) -v --color --coverage --diff \
|
||||
--docker ghcr.io/ansible-collections/community.mysql/test-container-$(db_client)-py$(python_version_flat)-$(connector_name)$(connector_version_flat):latest \
|
||||
--docker-network podman $(_continue_on_errors) $(_keep_containers_alive) --python $(python); set +x
|
||||
|
||||
# Start venv (use `; \` to keep the same shell)
|
||||
source .venv/$(ansible)/bin/activate; \
|
||||
python$(local_python_version) -m ensurepip; \
|
||||
python$(local_python_version) -m pip install --disable-pip-version-check \
|
||||
https://github.com/ansible/ansible/archive/$(ansible).tar.gz; \
|
||||
set -x; \
|
||||
ansible-test integration $(target) -v --color --coverage --diff \
|
||||
--docker ghcr.io/ansible-collections/community.mysql/test-container\
|
||||
-$(db_client)-py$(python_version_flat)-$(connector_name)$(connector_version_flat):latest \
|
||||
--docker-network podman $(_continue_on_errors) $(_keep_containers_alive) --python $(python); \
|
||||
set +x
|
||||
# End of venv
|
||||
|
||||
rm tests/integration/db_engine_name
|
||||
rm tests/integration/db_engine_version
|
||||
rm tests/integration/connector_name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue