e793cc4038
Since the original merge of this code
(04208e7c79
) several things have
changed; particularly now we ship dib-run-parts as part of dib, not as
a separate package.
We setup $_LIB to point to the shipped library diretory via
pkg_resources lookups. We now call dib-run-parts (as mentioned,
shipped as a dib library now), source scripts, etc. via $_LIB and thus
do not rely on $PATH. Consequently we don't need this activation
part.
Which is helpful, because "venv" (as opposed to virtualenv) doesn't
have activate_this.py. So this fixes installation under that for
Python 3.
We update the functional tests to use the virtualenv_command exported
by the ensure-pip role, which will test the venv path. There is no
need for dib_python as we are Python 3 only now.
Change-Id: Iede929ea2d278008220aac8b1d678ba41eba0d8a
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
- name: Install dib extra dependencies
|
|
command: ./install_test_deps.sh
|
|
args:
|
|
chdir: "{{ zuul.project.src_dir }}/tests"
|
|
become: yes
|
|
|
|
- name: Setup mounted space
|
|
file:
|
|
path: '/opt/dib_cache'
|
|
state: directory
|
|
mode: ugo+rw
|
|
become: yes
|
|
|
|
- name: Define upper_constraints
|
|
set_fact:
|
|
upper_constraints: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"
|
|
|
|
- name: Take ourselves out of uppper constraints
|
|
lineinfile:
|
|
path: "{{ upper_constraints }}"
|
|
state: absent
|
|
regexp: '^diskimage-builder'
|
|
|
|
- name: Install diskimage-builder
|
|
pip:
|
|
name: "file://{{ ansible_user_dir }}/{{ zuul.project.src_dir }}"
|
|
virtualenv: "{{ dib_virtualenv }}"
|
|
virtualenv_command: "{{ ensure_pip_virtualenv_command }}"
|
|
extra_args: "-c {{ upper_constraints }}"
|
|
|
|
- name: Setup log output
|
|
file:
|
|
path: "{{ ansible_user_dir }}/logs"
|
|
state: directory
|
|
mode: ugo+rw
|
|
|
|
- name: Run dib functional tests
|
|
shell:
|
|
cmd: |
|
|
source {{ dib_virtualenv }}/bin/activate
|
|
{{ zuul.project.src_dir }}/tests/run_functests.sh \
|
|
-L {{ ansible_user_dir }}/logs {{ dib_functests | join(' ') }} \
|
|
{{ dib_functests_extra | join(' ') }}
|
|
args:
|
|
executable: /bin/bash
|
|
environment:
|
|
DIB_NO_TMPFS: 1
|
|
TMPDIR: /opt/dib_cache
|
|
DIB_OS_CI_YUM_REPOS: "{{ dib_gate_mirror_repos|default(omit) }}"
|