Added support for installing python-tempestconf from git

In CI jobs, currently python-tempestconf is getting from pip,
which makes it hard to test dependent changes of the project.
By adding this support, one can test the python-tempestconf
changes in the review itself.

Setting tempest_developer_mode to true will exercise the same.

Change-Id: I7744270e7371260dcc4db146736710fb050f3502
This commit is contained in:
Chandan Kumar 2018-12-18 18:24:03 +05:30
parent 0c1726e2cb
commit cf90066608
3 changed files with 21 additions and 1 deletions

View File

@ -275,6 +275,14 @@ tempest_tempest_conf_overrides: {}
# tempest.conf from the template
tempest_use_tempestconf: false
tempest_tempestconf_venv_bin: "/openstack/venvs/tempestconf/bin"
# We comment out `tempest_tempestconf_git_repo` so that the repo_build role does not attempt to
# build the wheel from this repo/branch. Instead, we want python-tempestconf to get built
# from the stable release defined in global requirements.
# tempest_tempestconf_git_repo: https://git.openstack.org/openstack/python-tempestconf
tempest_tempestconf_git_install_branch: master
tempest_tempestconf_developer_constraints:
- "git+{{ tempest_tempestconf_git_repo }}@{{ tempest_tempestconf_git_install_branch }}#egg=python_tempestconf"
tempest_tempestconf_pip_packages:
- python-tempestconf
tempest_tempestconf_extra_cli_call_overrides:

View File

@ -13,12 +13,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Create developer mode constraint file for python-tempestconf
copy:
dest: "/opt/developer-pip-constraints.txt"
content: |
{% for item in tempest_tempestconf_developer_constraints %}
{{ item }}
{% endfor %}
when: tempest_developer_mode | bool
- name: Install python-tempestconf on venv
include_role:
name: "python_venv_build"
vars:
venv_install_destination_path: "{{ tempest_tempestconf_venv_bin | dirname }}"
venv_pip_install_args: "--isolated"
venv_pip_install_args: "{{ tempest_pip_install_args }}"
venv_pip_packages: "{{ tempest_tempestconf_pip_packages }}"
when: tempest_install_method == 'source'

View File

@ -16,6 +16,9 @@
# Ensure that tempest executes tests
tempest_run: yes
# tempestconf specific settings
tempest_tempestconf_git_repo: https://git.openstack.org/openstack/python-tempestconf
# A sample plugin to activate the code path
tempest_plugins:
- name: sahara-tests