Browse Source

Merge "Use stable constraint in run-tempest for stable branch testing"

changes/47/702647/6
Zuul Gerrit Code Review 2 weeks ago
parent
commit
9ddda2bd01
3 changed files with 32 additions and 1 deletions
  1. +13
    -0
      roles/run-tempest/README.rst
  2. +3
    -0
      roles/run-tempest/defaults/main.yaml
  3. +16
    -1
      roles/run-tempest/tasks/main.yaml

+ 13
- 0
roles/run-tempest/README.rst View File

@@ -72,3 +72,16 @@ Run Tempest
:default: ''

The timeout (in seconds) for each test.

.. zuul:rolevar:: stable_constraints_file
:default: ''

Upper constraints file to be used for stable branch till stable/rocky.

.. zuul:rolevar:: tempest_tox_environment
:default: ''

Environment variable to set for run-tempst task.

Env variables set in this variable will be combined with some more
defaults env variable set at runtime.

+ 3
- 0
roles/run-tempest/defaults/main.yaml View File

@@ -4,3 +4,6 @@ tox_envlist: smoke
tempest_black_regex: ''
tox_extra_args: ''
tempest_test_timeout: ''
stable_constraints_file: "{{ devstack_base_dir }}/requirements/upper-constraints.txt"
target_branch: "{{ zuul.branch }}"
tempest_tox_environment: {}

+ 16
- 1
roles/run-tempest/tasks/main.yaml View File

@@ -20,6 +20,21 @@
default_concurrency: "{{ num_cores|int // 2 }}"
when: num_cores|int > 3

- name: Override target branch
set_fact:
target_branch: "{{ zuul.override_checkout }}"
when: zuul.override_checkout is defined

- name: Use stable branch upper-constraints till stable/rocky
set_fact:
tempest_tox_environment: "{{ tempest_tox_environment | combine({'UPPER_CONSTRAINTS_FILE': stable_constraints_file}) }}"
when: target_branch in ["stable/ocata", "stable/pike", "stable/queens", "stable/rocky"]

- name: Set OS_TEST_TIMEOUT if requested
set_fact:
tempest_tox_environment: "{{ tempest_tox_environment | combine({'OS_TEST_TIMEOUT': tempest_test_timeout}) }}"
when: tempest_test_timeout != ''

- when:
- tempest_test_blacklist is defined
block:
@@ -42,4 +57,4 @@
chdir: "{{devstack_base_dir}}/tempest"
become: true
become_user: tempest
environment: '{{ {"OS_TEST_TIMEOUT": tempest_test_timeout} if tempest_test_timeout else {} }}'
environment: "{{ tempest_tox_environment }}"

Loading…
Cancel
Save