mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-25 11:51: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):
|
||||
test_is_excluded = False
|
||||
for excl in exclude_list:
|
||||
db_engine_match = False
|
||||
ansible_match = False
|
||||
python_match = False
|
||||
connector_match = False
|
||||
match = 0
|
||||
|
||||
if 'db_engine_version' not in excl:
|
||||
continue
|
||||
if 'ansible' not in excl:
|
||||
continue
|
||||
if 'python' not in excl:
|
||||
continue
|
||||
if 'connector' not in excl:
|
||||
continue
|
||||
if 'db_engine_version' in excl:
|
||||
if excl.get('db_engine_version') == test_suite[0]:
|
||||
match += 1
|
||||
|
||||
if excl.get('db_engine_version') == test_suite[0]:
|
||||
db_engine_match = True
|
||||
if excl.get('ansible') == test_suite[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 'ansible' in excl:
|
||||
if excl.get('ansible') == test_suite[1]:
|
||||
match += 1
|
||||
|
||||
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
|
||||
|
||||
return test_is_excluded
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue