aea85712d4
After I177b32622500dab54896fda740080d07f5f65261 we started to use testrepository from system, which is version 0.0.18 and generate subunit v1 output, and stackviz doesn't recognize it. So it's required to transform version 1 to 2 with subunit-1to2 command. I've tested manually, and the subunit-1to2 works either if you're using version 0.0.18 or 0.0.20. Change-Id: Ie7c3f3e734fabdd116cb2421e85c0595e3c56a87
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
---
|
|
- name: Cloning stackviz from openstack
|
|
git:
|
|
repo: git://git.openstack.org/openstack/stackviz
|
|
dest: "{{ working_dir }}/stackviz"
|
|
version: master
|
|
|
|
- name: Copying stackviz static files
|
|
synchronize:
|
|
src: stackviz/
|
|
dest: "{{ working_dir }}/stackviz_static"
|
|
use_ssh_args: true
|
|
|
|
- name: Install pip
|
|
easy_install:
|
|
name: pip
|
|
state: present
|
|
become: true
|
|
|
|
- name: Install stackviz
|
|
pip:
|
|
name: "."
|
|
chdir: "{{ working_dir }}/stackviz"
|
|
become: true
|
|
|
|
- name: Check if dstats file exists
|
|
stat: path=/var/log/extra/dstat-csv.log
|
|
register: dstat_result
|
|
|
|
- name: Set dstat fact
|
|
set_fact:
|
|
tempest_dstat_opt: '--dstat /var/log/extra/dstat-csv.log'
|
|
when: dstat_result.stat.exists
|
|
|
|
- name: Collecting data from tempest
|
|
shell: >
|
|
{% if tempest_format == 'venv' %}source {{ working_dir }}/tempest_git/.venv/bin/activate; {% endif %}
|
|
testr last --subunit | subunit-1to2 | stackviz-export {{ tempest_dstat_opt | default('') }} --env --stdin {{ working_dir }}/stackviz_static/data
|
|
args:
|
|
chdir: "{{ working_dir }}/tempest"
|
|
|
|
- name: Moving stackviz to /var/log/extra
|
|
shell: mv {{ working_dir }}/stackviz_static/ /var/log/extra/stackviz
|
|
become: true
|