--- # Copyright Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. # - name: Configuring tests to be executed via skiplist when: > cifmw_tempest_tests_allowed is not defined or cifmw_tempest_tests_allowed_override_scenario | bool block: - name: Copy list_allowed to artifacts dir ansible.builtin.copy: mode: "0644" dest: "{{ cifmw_tempest_artifacts_basedir }}/list_allowed.yml" src: "list_allowed.yml" - name: Get list of tests to be executed cifmw.general.tempest_list_allowed: yaml_file: "{{ cifmw_tempest_artifacts_basedir }}/list_allowed.yml" groups: "{{ cifmw_tempest_default_groups }}" job: "{{ cifmw_tempest_job_name | default(omit) }}" register: list_allowed - name: Creating include.txt ansible.builtin.copy: mode: "0644" dest: "{{ cifmw_tempest_artifacts_basedir }}/include.txt" content: "{% for test in list_allowed.allowed_tests %}{{ test }}\n{% endfor %}" - name: Show tests to be executed ansible.builtin.debug: msg: "{{ list_allowed }}" - name: Configuring tests to be skipped via skiplist when: > cifmw_tempest_tests_skipped is not defined or cifmw_tempest_tests_skipped_override_scenario | bool block: - name: Copy list_skipped to artifacts dir ansible.builtin.copy: mode: "0644" dest: "{{ cifmw_tempest_artifacts_basedir }}/list_skipped.yml" src: "list_skipped.yml" - name: Get list of tests to be excluded cifmw.general.tempest_list_skipped: yaml_file: "{{ cifmw_tempest_artifacts_basedir }}/list_skipped.yml" jobs: "{{ cifmw_tempest_default_jobs }}" register: list_skipped - name: Creating exclude.txt ansible.builtin.copy: mode: "0644" dest: "{{ cifmw_tempest_artifacts_basedir }}/exclude.txt" content: "{% for test in list_skipped.skipped_tests %}{{ test }}\n{% endfor %}" - name: Show tests to be excluded ansible.builtin.debug: msg: "{{ list_skipped.skipped_tests }}" - name: Configuring tests to be executed via cifmw_tempest_tests_allowed when: > cifmw_tempest_tests_allowed is defined and not cifmw_tempest_tests_allowed_override_scenario | bool block: - name: Creating include.txt ansible.builtin.copy: mode: "0644" dest: "{{ cifmw_tempest_artifacts_basedir }}/include.txt" content: "{% for test in cifmw_tempest_tests_allowed %}{{ test }}\n{% endfor %}" - name: Show tests to be executed ansible.builtin.debug: msg: "{{ cifmw_tempest_tests_allowed }}" - name: Configuring tests to be skipped via cifmw_tempest_tests_skipped when: > cifmw_tempest_tests_skipped is defined and not cifmw_tempest_tests_skipped_override_scenario | bool block: - name: Creating exclude.txt ansible.builtin.copy: mode: "0644" dest: "{{ cifmw_tempest_artifacts_basedir }}/exclude.txt" content: "{% for test in cifmw_tempest_tests_skipped %}{{ test }}\n{% endfor %}" - name: Show tests to be excluded ansible.builtin.debug: msg: "{{ cifmw_tempest_tests_skipped }}"