summaryrefslogtreecommitdiff
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 22:15:59 +0200
commit098775ca2a03d9a31747d7966edfdd8ae50ef0b3 (patch)
tree5c4cf1571736dad9d81924f04914b0525abe9038
parent7c3f7379feb41664c3881de99b54ca13a6b8ec61 (diff)
downloadcinder-098775ca2a03d9a31747d7966edfdd8ae50ef0b3.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 (cherry picked from commit 7e04b5b0d4c91df7601e8e7f36d49fb6d651ea2b) (cherry picked from commit 391f7c7f9bd395b1dafdd4fcc4c118fbe4dd0f77) (cherry picked from commit 6fb0d93b3c968ac86ac7910d46b9311ae905a67d) (cherry picked from commit c29a6d087e3277d71e4659c704acecfa88ad9949) (cherry picked from commit 070a0effbca23aa2410982e4df279abfc8a5d65f)
-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