Browse code

Add base jobs for functional tests

I keep copy-pasting these to projects from the shade repo. Let's make
some base jobs people can more easily use.

devstack-tox-functional runs devstack and a tox functional environment.

devstack-tox-functional-consumer is the same, but runs devstack in pre.
It's intended for projects for whom patches to the project won't
actually impact the devstack deployment (shade, nodepool, gophercloud
are all examples of such things)

Change-Id: I84de60181cb88574e341ff83cd4857cce241f2dd

Monty Taylor authored on 2017/12/07 00:07:47
Showing 5 changed files
... ...
@@ -91,6 +91,60 @@
91 91
     # ready yet. Until then this job should stay non-voting.
92 92
     voting: false
93 93
 
94
+- job:
95
+    name: devstack-tox-base
96
+    parent: devstack
97
+    description: |
98
+      Base job for devstack-based functional tests that use tox.
99
+
100
+      This job is not intended to be run directly. It's just here
101
+      for organizational purposes for devstack-tox-functional and
102
+      devstack-tox-functional-consumer.
103
+    post-run: playbooks/tox/post.yaml
104
+    vars:
105
+      tox_envlist: functional
106
+      tox_install_siblings: false
107
+
108
+- job:
109
+    name: devstack-tox-functional
110
+    parent: devstack-tox-base
111
+    description: |
112
+      Base job for devstack-based functional tests that use tox.
113
+
114
+      Runs devstack, then runs the tox ``functional`` environment,
115
+      then collects tox/testr build output like normal tox jobs.
116
+
117
+      Turns off tox sibling installation. Projects may be involved
118
+      in the devstack deployment and so may be in the required-projects
119
+      list, but may not want to test against master of the other
120
+      projects in their tox env. Child jobs can set tox_install_siblings
121
+      to True to re-enable sibling processing.
122
+    run: playbooks/tox/run-both.yaml
123
+
124
+- job:
125
+    name: devstack-tox-functional-consumer
126
+    parent: devstack
127
+    description: |
128
+      Base job for devstack-based functional tests for projects that
129
+      consume the devstack cloud.
130
+
131
+      This base job should only be used by projects that are not involved
132
+      in the devstack deployment step, but are instead projects that are using
133
+      devstack to get a cloud against which they can test things.
134
+
135
+      Runs devstack in pre-run, then runs the tox ``functional`` environment,
136
+      then collects tox/testr build output like normal tox jobs.
137
+
138
+      Turns off tox sibling installation. Projects may be involved
139
+      in the devstack deployment and so may be in the required-projects
140
+      list, but may not want to test against master of the other
141
+      projects in their tox env. Child jobs can set tox_install_siblings
142
+      to True to re-enable sibling processing.
143
+    pre-run:
144
+      - playbooks/devstack.yaml
145
+      - playbooks/tox/pre.yaml
146
+    run: playbooks/tox/run.yaml
147
+
94 148
 - project:
95 149
     name: openstack-dev/devstack
96 150
     check:
97 151
new file mode 100644
... ...
@@ -0,0 +1,5 @@
0
+- hosts: all
1
+  roles:
2
+    - fetch-tox-output
3
+    - fetch-testr-output
4
+    - fetch-stestr-output
0 5
new file mode 100644
... ...
@@ -0,0 +1,8 @@
0
+- hosts: all
1
+  roles:
2
+    # Run bindep and test-setup after devstack so that they won't interfere
3
+    - role: bindep
4
+      bindep_profile: test
5
+      bindep_dir: "{{ zuul_work_dir }}"
6
+    - test-setup
7
+    - ensure-tox
0 8
new file mode 100644
... ...
@@ -0,0 +1,10 @@
0
+- hosts: all
1
+  roles:
2
+    - run-devstack
3
+    # Run bindep and test-setup after devstack so that they won't interfere
4
+    - role: bindep
5
+      bindep_profile: test
6
+      bindep_dir: "{{ zuul_work_dir }}"
7
+    - test-setup
8
+    - ensure-tox
9
+    - tox
0 10
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+- hosts: all
1
+  roles:
2
+    - tox