mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-24 11:21:26 -07:00
Add option to run only a single target
This commit is contained in:
parent
4abb304bed
commit
2e56d5b53b
2 changed files with 6 additions and 2 deletions
|
@ -16,10 +16,14 @@ The Makefile accept the following options:
|
||||||
- db_engin_version: The name of the container to use. Either MYSQL or MariaDB. Use ':' as a separator. Do not use short version, like mysql:8 for instance. Our tests expect a full version to filter tests based on released version. For instance: when: db_version is version ('8.0.22', '>').
|
- db_engin_version: The name of the container to use. Either MYSQL or MariaDB. Use ':' as a separator. Do not use short version, like mysql:8 for instance. Our tests expect a full version to filter tests based on released version. For instance: when: db_version is version ('8.0.22', '>').
|
||||||
- connector: The name of the python package of the connector along with its version number. Use '==' as a separator.
|
- connector: The name of the python package of the connector along with its version number. Use '==' as a separator.
|
||||||
- python: The python version to use in the controller.
|
- python: The python version to use in the controller.
|
||||||
- target : TODO, I need to implement a Makefile optional variable for that.
|
- target : If omitted, all test targets will run. But you can limit the tests to a single target to speed up your tests.
|
||||||
|
|
||||||
Exemples:
|
Exemples:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
# Run all tests
|
||||||
make db_engine_version="mysql:5.7.40" connector="pymysql==0.7.10" python="3.8"
|
make db_engine_version="mysql:5.7.40" connector="pymysql==0.7.10" python="3.8"
|
||||||
|
|
||||||
|
# A single target
|
||||||
|
make db_engine_version="mysql:5.7.40" connector="pymysql==0.7.10" python="3.8" target="test_mysql_db"
|
||||||
```
|
```
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -33,7 +33,7 @@ test-integration:
|
||||||
$(db_engine_version) \
|
$(db_engine_version) \
|
||||||
mysqld --server-id 3 --log-bin=/var/lib/mysql/replica2-bin
|
mysqld --server-id 3 --log-bin=/var/lib/mysql/replica2-bin
|
||||||
while ! podman healthcheck run primary && [[ "$$SECONDS" -lt 120 ]]; do sleep 1; done
|
while ! podman healthcheck run primary && [[ "$$SECONDS" -lt 120 ]]; do sleep 1; done
|
||||||
-set -x; ansible-test integration -v --color --coverage --retry-on-error --continue-on-error --diff --docker --docker-network podman --python $(python); set +x
|
-set -x; ansible-test integration $(target) -v --color --coverage --retry-on-error --continue-on-error --diff --docker --docker-network podman --python $(python); set +x
|
||||||
rm tests/integration/db_engine_version
|
rm tests/integration/db_engine_version
|
||||||
rm tests/integration/connector
|
rm tests/integration/connector
|
||||||
podman stop --time 0 --ignore primary
|
podman stop --time 0 --ignore primary
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue