Merge "Create extra-test-setup role" into feature/zuulv3
diff --git a/playbooks/roles/extra-test-setup/tasks/main.yaml b/playbooks/roles/extra-test-setup/tasks/main.yaml
new file mode 100644
index 0000000..08e46f3
--- /dev/null
+++ b/playbooks/roles/extra-test-setup/tasks/main.yaml
@@ -0,0 +1,13 @@
+---
+- name: Check if tools/test-setup.sh exists.
+ stat:
+ path: "/home/zuul/workspace/src/{{ zuul.project }}/tools/test-setup.sh"
+ register: p
+
+- name: Run tools/test-setup.sh.
+ shell: tools/test-setup.sh
+ args:
+ chdir: "/home/zuul/workspace/src/{{ zuul.project }}"
+ when:
+ - p.stat.exists
+ - p.stat.executable
diff --git a/playbooks/tox-cover.yaml b/playbooks/tox-cover.yaml
index ca391e1..19921fc 100644
--- a/playbooks/tox-cover.yaml
+++ b/playbooks/tox-cover.yaml
@@ -1,3 +1,4 @@
- hosts: all
roles:
+ - extra-test-setup
- run-cover
diff --git a/playbooks/tox-py27.yaml b/playbooks/tox-py27.yaml
index 13756b5..64721e9 100644
--- a/playbooks/tox-py27.yaml
+++ b/playbooks/tox-py27.yaml
@@ -2,4 +2,5 @@
vars:
run_tox_envlist: py27
roles:
+ - extra-test-setup
- run-tox