| |
@@ -1,18 +1,20 @@
|
| |
---
|
| |
- hosts: localhost
|
| |
tasks:
|
| |
- - name: Check for tests/tests.yml exists
|
| |
- stat:
|
| |
- path: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/tests.yml"
|
| |
+ - name: Check for tests/tests*.yml exists
|
| |
+ shell: "ls tests/tests*.yml"
|
| |
+ failed_when: false
|
| |
register: tests_stat
|
| |
+ args:
|
| |
+ chdir: "{{ zuul.project.src_dir }}"
|
| |
- zuul_return:
|
| |
data:
|
| |
zuul:
|
| |
child_jobs:
|
| |
- rpm-sti-test
|
| |
- when: tests_stat.stat.exists
|
| |
+ when: tests_stat.rc == 0
|
| |
- zuul_return:
|
| |
data:
|
| |
zuul:
|
| |
child_jobs: []
|
| |
- when: not tests_stat.stat.exists
|
| |
+ when: not tests_stat.rc == 0
|
| |
This patch fixes an issue where only tests/tests.yml was checked
for embeded STI tests.
This also removes the useless usage of ansible_user_dir.