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
from cinder-tempest-plugin.git to this repository.
- setup-tempest-data-dir
- acl-devstack-files
- 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
- role: change-devstack-data-owner
devstack_data_subdir_changed: cinder
- role: run-cinderlib-tests
tox_install_siblings: false
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
