Handle the case when tempest fails
Before this change, the errors from tempest run are suppressed in order to always execute cinderlib tests. Use the variable exported by run-tempest instead, and fail properly if needed. This is a port of Ic1fd6fcc9b9183f195c66f0022e913ae9734c97b from cinder-tempest-plugin.git to this repository. Change-Id: I216a82a29c7fb6b1b2fac95b2a1af667c4e2b22d (cherry picked from commit7e04b5b0d4
) (cherry picked from commit391f7c7f9b
) (cherry picked from commit6fb0d93b3c
) (cherry picked from commitc29a6d087e
)
This commit is contained in:
parent
3aa3968342
commit
070a0effbc
@ -19,7 +19,7 @@
|
|||||||
- setup-tempest-data-dir
|
- setup-tempest-data-dir
|
||||||
- acl-devstack-files
|
- acl-devstack-files
|
||||||
- role: run-tempest
|
- role: run-tempest
|
||||||
# ignore the errors, so that run-cinderlib-tests is always executed
|
# ignore the errors here (but consider them later), so that run-cinderlib-tests is always executed
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
- role: change-devstack-data-owner
|
- role: change-devstack-data-owner
|
||||||
devstack_data_subdir_changed: cinder
|
devstack_data_subdir_changed: cinder
|
||||||
@ -27,3 +27,8 @@
|
|||||||
- role: run-cinderlib-tests
|
- role: run-cinderlib-tests
|
||||||
tox_install_siblings: false
|
tox_install_siblings: false
|
||||||
cinderlib_base_dir: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/cinderlib'].src_dir }}"
|
cinderlib_base_dir: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/cinderlib'].src_dir }}"
|
||||||
|
post_tasks:
|
||||||
|
- name: Fail if the first tempest run did not work
|
||||||
|
fail:
|
||||||
|
msg: "tempest run returned with an error"
|
||||||
|
when: tempest_run_result is defined and tempest_run_result.rc != 0
|
||||||
|
Loading…
Reference in New Issue
Block a user