Added support for installing tempest plugins from git

In order to use it, in any FS, set tempest_format to venv
and then set:
tempest_plugins_venv:
  - '<complete upstream openstack tempest plugin git url>'

Change-Id: I95a4449ca3976a914faf1ba5f3f4c0e756a6fefc
This commit is contained in:
Chandan Kumar 2018-10-22 18:11:37 +05:30
parent debdc345cb
commit 881d16fb42
4 changed files with 23 additions and 1 deletions

View File

@ -35,6 +35,15 @@ Role Variables
* `check_tempest_bugs`: true/false - Will check every bugzilla and launchpad bug in the yaml skip file
* `tempest_plugins`: list - List of openstack services tempest plugins to be
installed
* `tempest_plugins_git`: list - (optional) List of URLs for openstack tempest plugins you want to have installed.
(Required) `tempest_format`: venv
For example:
```
tempest_format: venv
tempest_plugins_git: [https://git.openstack.org/openstack/tempest-tripleo-ui,
https://git.openstack.org/openstack/keystone-tempest-plugin,
https://git.openstack.org/openstack/cinder-tempest-plugin]
```
* `tempest_extra_config`: dict - A dict of tempest configuration which needs to be overridden in tempest.conf,
It should be like section.key: value.
* `tempest_conf_removal`: dict - A dict of tempest configuration which will be

View File

@ -58,7 +58,7 @@ tempest_plugins: >-
{%- else -%}
[ "python-keystone-tests", "python-neutron-tests" ]
{%- endif -%}
tempest_plugins_git: []
tempest_extra_config: {} # A dict containing values which needs to be overridden in tempest.conf
skip_file_src: "skip_file.j2"
skip_file: skip_file

View File

@ -37,6 +37,15 @@
python-virtualenv
{% endif %}
- name: Clone tempest plugins
git:
repo: "{{ item }}"
dest: "{{ working_dir }}/{{ item.split('/')[-1] }}"
version: master
with_items: "{{ tempest_plugins_git }}"
when:
- tempest_format == 'venv'
- name: Install packages required for create venv
package:
state: present

View File

@ -56,6 +56,10 @@ virtualenv --system-site-packages {{ working_dir }}/tempest_git/.venv
{{ working_dir }}/tempest_git/tools/with_venv.sh pip install -U pip
{{ working_dir }}/tempest_git/tools/with_venv.sh pip install -U setuptools
{{ working_dir }}/tempest_git/tools/with_venv.sh pip install {{ working_dir }}/tempest_git junitxml
# Install tempest plugins in tempest .venv
{% for tempest_plugin in (tempest_plugins_git|default([])) %}
{{ working_dir }}/tempest_git/tools/with_venv.sh pip install {{ working_dir }}/{{ tempest_plugin.replace('.git', '').split('/')[-1] }}
{% endfor %}
# Install python-tempestconf
{% if release != 'newton'%}