mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-28 21:31:27 -07:00
Fix exclusion function
This commit is contained in:
parent
671011352c
commit
0494de3f5c
1 changed files with 16 additions and 21 deletions
|
@ -30,30 +30,25 @@ def extract_matrix(workflow_yaml):
|
||||||
def is_exclude(exclude_list, test_suite):
|
def is_exclude(exclude_list, test_suite):
|
||||||
test_is_excluded = False
|
test_is_excluded = False
|
||||||
for excl in exclude_list:
|
for excl in exclude_list:
|
||||||
db_engine_match = False
|
match = 0
|
||||||
ansible_match = False
|
|
||||||
python_match = False
|
|
||||||
connector_match = False
|
|
||||||
|
|
||||||
if 'db_engine_version' not in excl:
|
if 'db_engine_version' in excl:
|
||||||
continue
|
if excl.get('db_engine_version') == test_suite[0]:
|
||||||
if 'ansible' not in excl:
|
match += 1
|
||||||
continue
|
|
||||||
if 'python' not in excl:
|
|
||||||
continue
|
|
||||||
if 'connector' not in excl:
|
|
||||||
continue
|
|
||||||
|
|
||||||
if excl.get('db_engine_version') == test_suite[0]:
|
if 'ansible' in excl:
|
||||||
db_engine_match = True
|
if excl.get('ansible') == test_suite[1]:
|
||||||
if excl.get('ansible') == test_suite[1]:
|
match += 1
|
||||||
ansible_match = True
|
|
||||||
if excl.get('python') == test_suite[2]:
|
|
||||||
python_match = True
|
|
||||||
if excl.get('connector') == test_suite[3]:
|
|
||||||
connector_match = True
|
|
||||||
|
|
||||||
if any(db_engine_match, ansible_match, python_match, connector_match):
|
if 'python' in excl:
|
||||||
|
if excl.get('python') == test_suite[2]:
|
||||||
|
match += 1
|
||||||
|
|
||||||
|
if 'connector' in excl:
|
||||||
|
if excl.get('connector') == test_suite[3]:
|
||||||
|
match += 1
|
||||||
|
|
||||||
|
if match > 1:
|
||||||
test_is_excluded = True
|
test_is_excluded = True
|
||||||
|
|
||||||
return test_is_excluded
|
return test_is_excluded
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue