Merge "Move subunit test results generation pieces in tempest-results"
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
---
|
||||
- name: Fetch nosetests results
|
||||
fetch:
|
||||
src: "{{ working_dir }}/tempest/tempest.xml"
|
||||
dest: "{{ lookup('env', 'PWD') }}/nosetests.xml"
|
||||
flat: yes
|
||||
|
||||
- name: Generate subunit results file
|
||||
shell: |
|
||||
find '{{ working_dir }}/tempest/.testrepository/' -regex '.*/[0-9]+' \
|
||||
@@ -28,16 +22,30 @@
|
||||
|
||||
- name: Generate HTML results file
|
||||
shell: |
|
||||
{% if tempest_format == 'venv' %}source {{ working_dir }}/tempest_git/.venv/bin/activate; {% endif %}
|
||||
subunit2html $(find {{ working_dir }}/tempest/.testrepository -name [0-9] \
|
||||
| head -1) {{ working_dir }}/tempest/tempest.html \
|
||||
2>&1 >> {{ tempest_log_file }}
|
||||
|
||||
- name: Generate XML results file
|
||||
shell: |
|
||||
{% if tempest_format == 'venv' %}source {{ working_dir }}/tempest_git/.venv/bin/activate; {% endif %}
|
||||
subunit2junitxml $(find {{ working_dir }}/tempest/.testrepository -name [0-9] \
|
||||
| head -1) {{ working_dir }}/tempest/tempest.xml \
|
||||
2>&1 >> {{ tempest_log_file }}
|
||||
|
||||
- name: Fetch HTML results
|
||||
fetch:
|
||||
src: "{{ working_dir }}/tempest/tempest.html"
|
||||
dest: "{{ lookup('env', 'PWD') }}/tempest.html"
|
||||
flat: yes
|
||||
|
||||
- name: Fetch nosetests results
|
||||
fetch:
|
||||
src: "{{ working_dir }}/tempest/tempest.xml"
|
||||
dest: "{{ lookup('env', 'PWD') }}/nosetests.xml"
|
||||
flat: yes
|
||||
|
||||
- name: Copying tempestmail files
|
||||
synchronize:
|
||||
src: tempestmail/
|
||||
|
@@ -10,15 +10,11 @@
|
||||
|
||||
{% if tempest_format == "venv" %}
|
||||
export OSTESTR='{{ working_dir }}/tempest_git/tools/with_venv.sh ostestr'
|
||||
export S2JXML='{{ working_dir }}/tempest_git/tools/with_venv.sh subunit2junitxml --output-to=tempest.xml'
|
||||
export SUBUNIT='{{ working_dir }}/tempest_git/tools/with_venv.sh subunit-trace --no-failure-debug -f'
|
||||
export TEMPESTCLI='{{ working_dir }}/tempest_git/tools/with_venv.sh tempest'
|
||||
## List Tests
|
||||
{{ working_dir }}/tempest_git/tools/with_venv.sh ostestr -l
|
||||
{% elif tempest_format == "packages" %}
|
||||
export OSTESTR='ostestr'
|
||||
export S2JXML='subunit2junitxml --output-to=tempest.xml'
|
||||
export SUBUNIT='subunit-trace --no-failure-debug -f'
|
||||
export TEMPESTCLI='/usr/bin/tempest'
|
||||
ostestr -l
|
||||
{% endif %}
|
||||
@@ -32,13 +28,12 @@ $TEMPESTCLI list-plugins
|
||||
$TEMPESTCLI cleanup --init-saved-state
|
||||
{% endif %}
|
||||
|
||||
( $OSTESTR --no-pretty --subunit \
|
||||
$OSTESTR --no-pretty --subunit \
|
||||
{% if test_regex != '' %} --regex '({{ test_regex }})' {% endif %}
|
||||
{% if tempest_whitelist|length > 0 %} --whitelist_file={{ working_dir }}/{{ tempest_whitelist_file }} {% endif %}
|
||||
{% if skip_file_src != '' %} --blacklist_file={{ working_dir }}/{{ skip_file }} {% endif %}
|
||||
{% if tempest_workers is defined %} --concurrency {{ tempest_workers }} {% endif %}
|
||||
{% if tempest_until_failure|bool %} --until-failure {% endif %}
|
||||
) | tee >( $S2JXML ) | $SUBUNIT
|
||||
|
||||
## Check which all tenants would be modified in the tempest run
|
||||
## It will create dry_run.json in tempest workspace.
|
||||
|
Reference in New Issue
Block a user