From fcd258cb70427b82a3908a03c0b0f516d68a760f Mon Sep 17 00:00:00 2001 From: Chandan Kumar Date: Wed, 21 Nov 2018 12:10:12 +0530 Subject: [PATCH] Added task to list tempest tests tempest list-plugins just lists the installed tempest plugins discovered by tempest and it does not gurantee that listed tempest plugins tests are going to get listed/discovered by the tempest runner. tempest run -l will list all the tempest tests by checking relative imports of the listed tests and making sure we are good to run the tests by using tempest run and helps to avoid import errors during the running of tempest tests. Change-Id: Ie1a9266ade6ef0cd411ad0f32ffc3d496d7bde0f --- tasks/tempest_post_install.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tasks/tempest_post_install.yml b/tasks/tempest_post_install.yml index 21ab9f94..7ae962d5 100644 --- a/tasks/tempest_post_install.yml +++ b/tasks/tempest_post_install.yml @@ -76,6 +76,20 @@ executable: /bin/bash when: "debug | bool" +- name: List tempest tests + shell: | + set -e + if [ -d {{ tempest_venv_bin }} ]; + then + . {{ tempest_venv_bin }}/activate + fi + tempest run -l + args: + chdir: "{{ tempest_workspace }}" + executable: /bin/bash + when: "debug | bool" + changed_when: false + - name: Generate tempest test whitelist copy: content: |