diff --git a/roles/validate-tempest/README.md b/roles/validate-tempest/README.md index 2db2aace5..df4db86bf 100644 --- a/roles/validate-tempest/README.md +++ b/roles/validate-tempest/README.md @@ -17,7 +17,8 @@ Role Variables * `tempest_format`: venv/packages - Which tempest installation to use - either install python virtual environment with installed there python modules from requirements file, or to use installed with RDO RPM packages * `tempest_log_file` - name of log file for tempest run -* `test_regex` - tests regular expression for tempest run, i.e. smoke or tempest.api.object_storage|keystone_tempest_plugin. +* `test_white_regex` - tests regular expression for tempest run, i.e. smoke or tempest.api.object_storage|keystone_tempest_plugin. + `test_regex` is deprecated and switch to `test_white_regex`, will be removed by end of Rocky release. * `run_tempest`: false/true - to run tempest or not * `tempest_config`: false/true - whether to prepare the script which configures and runs tempest or not * `tempest_whitelist`: list - list of tests you want to be executed. set `skip_file_src` diff --git a/roles/validate-tempest/defaults/main.yml b/roles/validate-tempest/defaults/main.yml index bce776c2c..87b7316c5 100644 --- a/roles/validate-tempest/defaults/main.yml +++ b/roles/validate-tempest/defaults/main.yml @@ -5,7 +5,7 @@ public_net_pool_start: "{{ floating_ip_cidr|nthhost(100) }}" public_net_pool_end: "{{ floating_ip_cidr|nthhost(120) }}" public_net_gateway: "{{ floating_ip_cidr|nthhost(1) }}" tempest_log_file: 'tempest_output.log' -test_regex: smoke +test_white_regex: "{{ test_regex|default('smoke') }}" test_black_regex: [] check_tempest_bugs: false diff --git a/roles/validate-tempest/tasks/pre-tempest.yml b/roles/validate-tempest/tasks/pre-tempest.yml index 0654e5ef4..2ee50fab0 100644 --- a/roles/validate-tempest/tasks/pre-tempest.yml +++ b/roles/validate-tempest/tasks/pre-tempest.yml @@ -14,6 +14,11 @@ dest: "{{ working_dir }}/tempest-setup.sh" mode: 0744 +- name: Deprecation message for test_regex + debug: + msg: "WARNING: The variable test_regex is deprecated and will be removed by end of ROCKY release in the favor of test_white_regex." + when: test_regex is defined + - name: Load skip list variables (undercloud or overcloud) include_vars: file: "tempest_skip_{{ release }}.yml" diff --git a/roles/validate-tempest/templates/run-tempest.sh.j2 b/roles/validate-tempest/templates/run-tempest.sh.j2 index d82f6ab4b..f027b497d 100644 --- a/roles/validate-tempest/templates/run-tempest.sh.j2 +++ b/roles/validate-tempest/templates/run-tempest.sh.j2 @@ -22,7 +22,7 @@ $TEMPESTCLI list-plugins $TEMPESTCLI cleanup --init-saved-state {% endif %} -{% if release not in ["master", "queens"] %} $OSTESTR {% else %} $TEMPESTCLI run {% endif %}{% if test_regex != '' %} --regex '({{ test_regex }})' {% endif %} +{% if release not in ["master", "queens"] %} $OSTESTR {% else %} $TEMPESTCLI run {% endif %}{% if test_white_regex != '' %} --regex '({{ test_white_regex }})' {% endif %} {% if tempest_whitelist|length > 0 %} --whitelist_file={{ working_dir }}/{{ tempest_whitelist_file }} {% endif %} {% if release not in ["newton", "ocata", "pike"] %} {% if test_black_regex|length > 0 %} --black-regex='{{ test_black_regex|join('|') }}' {% endif %} {% endif %} {% if skip_file_src != '' %} --blacklist_file={{ working_dir }}/{{ skip_file }} {% endif %}