From b3ee4f9bedd9b04877232e91a68561f16c768564 Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman <rjeffman@redhat.com> Date: Fri, 26 Aug 2022 01:48:15 -0300 Subject: [PATCH] tests: Drop pytest-split-tests in favor of pytest-split The plugin pytest-split-tests is used to split the tests in several groups so that the tests can be executed in parallel is upstream CI. The issue is thet pytest-split-tests last release was more that a year ago, upstream developers have not been responsive, and there is a bug when the number of tests to be executed by a group is zero. The patch to fix this issue has been open for a year. This patch deprecates the use of pytest-split-tests, changing the plugin used to split the tests to pytest-split, which is actively mainatined. --- requirements-tests.txt | 2 +- tests/azure/templates/galaxy_script.yml | 5 ++--- tests/azure/templates/playbook_tests.yml | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/requirements-tests.txt b/requirements-tests.txt index 4e75ad60..390a5eeb 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -1,6 +1,6 @@ -r requirements.txt pytest>=2.7 pytest-sourceorder>=0.5 -pytest-split-tests>=1.0.3 +pytest-split>=0.8.0 pytest-testinfra>=5.0 pyyaml>=3 diff --git a/tests/azure/templates/galaxy_script.yml b/tests/azure/templates/galaxy_script.yml index 6d20bbd6..57ce8d3a 100644 --- a/tests/azure/templates/galaxy_script.yml +++ b/tests/azure/templates/galaxy_script.yml @@ -60,9 +60,8 @@ jobs: -m "playbook" \ --verbose \ --color=yes \ - --test-group-count=${{ parameters.number_of_groups }} \ - --test-group=${{ parameters.group_number }} \ - --test-group-random-seed=97943259814 \ + --splits=${{ parameters.number_of_groups }} \ + --group=${{ parameters.group_number }} \ --junit-xml=TEST-results-group-${{ parameters.group_number }}.xml displayName: Run playbook tests env: diff --git a/tests/azure/templates/playbook_tests.yml b/tests/azure/templates/playbook_tests.yml index 4001a647..729a8975 100644 --- a/tests/azure/templates/playbook_tests.yml +++ b/tests/azure/templates/playbook_tests.yml @@ -61,9 +61,8 @@ jobs: -m "playbook" \ --verbose \ --color=yes \ - --test-group-count=${{ parameters.number_of_groups }} \ - --test-group=${{ parameters.group_number }} \ - --test-group-random-seed=97943259814 \ + --splits=${{ parameters.number_of_groups }} \ + --group=${{ parameters.group_number }} \ --junit-xml=TEST-results-group-${{ parameters.group_number }}.xml displayName: Run playbook tests env: -- GitLab