summaryrefslogtreecommitdiff
path: root/playbooks/tempest-and-cinderlib-run.yaml
diff options
context:
space:
mode:
authorLuigi Toscano <ltoscano@redhat.com>2022-05-03 17:22:27 +0200
committerLuigi Toscano <ltoscano@redhat.com>2022-05-03 17:22:27 +0200
commit7e04b5b0d4c91df7601e8e7f36d49fb6d651ea2b (patch)
tree9ce0915ee8298e1ddc57161023a72d598ae84f8c /playbooks/tempest-and-cinderlib-run.yaml
parenta5405554577f16c7d498ef55844d00b1fce6aa9d (diff)
downloadcinder-7e04b5b0d4c91df7601e8e7f36d49fb6d651ea2b.tar.gz
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
Diffstat (limited to 'playbooks/tempest-and-cinderlib-run.yaml')
-rw-r--r--playbooks/tempest-and-cinderlib-run.yaml7
1 files changed, 6 insertions, 1 deletions
diff --git a/playbooks/tempest-and-cinderlib-run.yaml b/playbooks/tempest-and-cinderlib-run.yaml
index cbb33273d..e71417d2b 100644
--- a/playbooks/tempest-and-cinderlib-run.yaml
+++ b/playbooks/tempest-and-cinderlib-run.yaml
@@ -19,7 +19,7 @@
- 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
@@ -27,3 +27,8 @@
- 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