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