From ea8ae41f6146d762bfe4b146a71dbda6740dcf08 Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Mon, 3 Dec 2018 19:41:34 +0530 Subject: [PATCH] Use tempest run for generating subunit results tempest run under the hood uses stestr and also provides --subunit option to geneate subunit raw ouput. Instead of using extra stestr binary use tempest run binary for running tempest and generating subunit raw output. It also helps to maintain one less dependency while using tempest from master. Change-Id: I8dce171bf8d4534d99659096dc9ebd72e8164e2e --- defaults/main.yml | 2 -- tasks/tempest_run.yml | 25 +------------------------ vars/ubuntu.yml | 2 -- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 0022dc57..ff8ea4b7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -16,8 +16,6 @@ ## Verbosity Options debug: False -stestr_executable: "{{ _stestr_executable | default('stestr') }}" - # Install openstack tempest # set the tempest_install_method to source or distro # on choosing source it will install from git or venv diff --git a/tasks/tempest_run.yml b/tasks/tempest_run.yml index 05a8ce00..a0417a34 100644 --- a/tasks/tempest_run.yml +++ b/tasks/tempest_run.yml @@ -21,7 +21,7 @@ then . {{ tempest_venv_bin }}/activate fi - tempest run {% if tempest_run_concurrency is defined %}{% if tempest_run_concurrency | int > 0 %}--concurrency {{ tempest_run_concurrency | int }}{% else %}--serial{% endif %}{% endif %} --whitelist-file {{ tempest_test_whitelist_file_path }}{% if tempest_test_blacklist | length > 0 %} --blacklist-file {{ tempest_test_blacklist_file_path }}{% endif %} + tempest run {% if tempest_run_concurrency is defined %}{% if tempest_run_concurrency | int > 0 %}--concurrency {{ tempest_run_concurrency | int }}{% else %}--serial{% endif %}{% endif %} --whitelist-file {{ tempest_test_whitelist_file_path }}{% if tempest_test_blacklist | length > 0 %} --blacklist-file {{ tempest_test_blacklist_file_path }}{% endif %} --subunit > {{ tempest_log_dir }}/testrepository.subunit args: chdir: "{{ tempest_workspace }}" executable: /bin/bash @@ -31,29 +31,6 @@ # don't trigger ANSIBLE0013 - skip_ansible_lint - always: - - name: Generate raw subunit results - # Despite not using testrepository, we leave the output filename as - # testrepository.subunit as the OpenStack Health dashboard relies on - # subunit files with this particular name. - # NOTE(mattt): At present we're not placing this file in a valid location - # to be used by the OpenStack Health dashboard. - shell: | - set -e - if [ -d {{ tempest_venv_bin }} ]; - then - . {{ tempest_venv_bin }}/activate - fi - {{ stestr_executable }} last --subunit > {{ tempest_log_dir }}/testrepository.subunit - args: - chdir: "{{ tempest_workspace }}" - executable: /bin/bash - changed_when: false - failed_when: false - tags: - # don't trigger ANSIBLE0013 - - skip_ansible_lint - - name: Generate xml subunit results shell: | set -e diff --git a/vars/ubuntu.yml b/vars/ubuntu.yml index 77e1a426..6b8dcb9f 100644 --- a/vars/ubuntu.yml +++ b/vars/ubuntu.yml @@ -16,8 +16,6 @@ ## APT Cache options cache_timeout: 600 -_stestr_executable: "{{ (tempest_install_method == 'distro') | ternary('testr', 'stestr') }}" - tempest_distro_packages: - git-core - libxslt1.1 # required by the python module unittest2