zuul-jobs/roles/test-setup/tasks/main.yaml
Andreas Jaeger 7513629be7 Skip test-setup.sh in pep8 jobs
pep8 jobs should not require database setup, etc, so we can skip
running test-setup.sh to save time.

Also, address comments from https://review.opendev.org/670120 and
use a block to not run the stat if can we will skip using the file.

Change-Id: Ia140b331ae1502fcf1f685faa6dace117d77d35d
2019-07-10 19:02:57 +02:00

16 lines
440 B
YAML

- when: not test_setup_skip
block:
- name: "Check if project's tools/test-setup.sh exists"
stat:
path: "{{ zuul_work_dir }}/tools/test-setup.sh"
register: p
- name: Run tools/test-setup.sh
command: tools/test-setup.sh {{ test_setup_args }}
environment: "{{ test_setup_environment }}"
args:
chdir: "{{ zuul_work_dir }}"
when:
- p.stat.exists
- p.stat.executable