summaryrefslogtreecommitdiffstats
path: root/features/build.feature
blob: 49b2d24d38e1f11fda8e072996f86d031faacf16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
@source
Feature: custom APT sources to build branches
  As a Tails developer, when I build Tails, I'd be happy if
  the proper APT sources were automatically picked depending
  on which Git branch I am working on.

  Scenario: build from an untagged stable branch where the config/APT_overlays.d directory is empty
    Given I am working on the stable base branch
    And the last version mentioned in debian/changelog is 1.0
    And Tails 1.0 has not been released yet
    And the config/APT_overlays.d directory is empty
    When I successfully run tails-custom-apt-sources
    Then I should see only the 'stable' suite

  Scenario: build from an untagged stable branch where config/APT_overlays.d is not empty
    Given I am working on the stable base branch
    And the last version mentioned in debian/changelog is 1.0
    And Tails 1.0 has not been released yet
    And config/APT_overlays.d contains 'feature-foo'
    And config/APT_overlays.d contains 'bugfix-bar'
    When I successfully run tails-custom-apt-sources
    Then I should see the 'stable' suite
    And I should see the 'feature-foo' suite
    And I should see the 'bugfix-bar' suite
    But I should not see the '1.0' suite

  Scenario: build from an untagged stable branch with no encoded time-based snapshot
    Given I am working on the stable base branch
    And Tails 0.10 has been released
    And the last versions mentioned in debian/changelog are 0.10 and 1.0
    And Tails 1.0 has not been released yet
    And no frozen APT snapshot is encoded in config/APT_snapshots.d
    When I successfully run "apt-snapshots-serials prepare-build"
    And I run "apt-mirror debian"
    Then it should fail
    When I run "apt-mirror torproject"
    Then it should fail
    When I successfully run "apt-mirror debian-security"
    Then I should see a time-based snapshot

  Scenario: build from an untagged stable branch with encoded time-based snapshots
    Given I am working on the stable base branch
    And Tails 0.10 has been released
    And the last versions mentioned in debian/changelog are 0.10 and 1.0
    And Tails 1.0 has not been released yet
    And frozen APT snapshots are encoded in config/APT_snapshots.d
    When I successfully run "apt-snapshots-serials prepare-build"
    And I successfully run "apt-mirror debian"
    Then I should see a time-based snapshot
    When I successfully run "apt-mirror torproject"
    Then I should see a time-based snapshot
    When I successfully run "apt-mirror debian-security"
    Then I should see a time-based snapshot

  Scenario: build from a tagged stable branch where the config/APT_overlays.d directory is empty
    Given Tails 0.10 has been released
    And the last version mentioned in debian/changelog is 0.10
    And I am working on the stable base branch
    And I checkout the 0.10 tag
    And the config/APT_overlays.d directory is empty
    When I successfully run tails-custom-apt-sources
    Then I should see only the '0.10' suite

  Scenario: build from a tagged stable branch where config/APT_overlays.d is not empty
    Given Tails 0.10 has been released
    And the last version mentioned in debian/changelog is 0.10
    And I am working on the stable base branch
    And I checkout the 0.10 tag
    And config/APT_overlays.d contains 'feature-foo'
    When I run tails-custom-apt-sources
    Then it should fail

  Scenario: build from a tagged stable branch with no encoded time-based snapshot
    Given I am working on the stable base branch
    And Tails 0.10 has been released
    And the last version mentioned in debian/changelog is 0.10
    And no frozen APT snapshot is encoded in config/APT_snapshots.d
    And I checkout the 0.10 tag
    When I successfully run "apt-snapshots-serials prepare-build"
    And I run "apt-mirror debian"
    Then it should fail
    When I run "apt-mirror torproject"
    Then it should fail
    When I successfully run "apt-mirror debian-security"
    Then I should see the 0.10 tagged snapshot

  Scenario: build from a tagged stable branch with encoded time-based snapshots
    Given I am working on the stable base branch
    And Tails 0.10 has been released
    And the last version mentioned in debian/changelog is 0.10
    And frozen APT snapshots are encoded in config/APT_snapshots.d
    And I checkout the 0.10 tag
    When I successfully run "apt-snapshots-serials prepare-build"
    And I successfully run "apt-mirror debian"
    Then I should see the 0.10 tagged snapshot
    When I successfully run "apt-mirror torproject"
    Then I should see the 0.10 tagged snapshot
    When I successfully run "apt-mirror debian-security"
    Then I should see the 0.10 tagged snapshot

  Scenario: build from a bugfix branch without overlays for a stable release
    Given Tails 0.10 has been released
    And the last version mentioned in debian/changelog is 0.10.1
    And Tails 0.10.1 has not been released yet
    And I am working on the bugfix/disable_gdomap branch based on stable
    And the config/APT_overlays.d directory is empty
    When I successfully run tails-custom-apt-sources
    Then I should see only the 'stable' suite

  Scenario: build from a bugfix branch with overlays for a stable release
    Given Tails 0.10 has been released
    And the last version mentioned in debian/changelog is 0.10.1
    And Tails 0.10.1 has not been released yet
    And I am working on the bugfix/disable_gdomap branch based on stable
    And config/APT_overlays.d contains 'bugfix-disable-gdomap'
    And config/APT_overlays.d contains 'bugfix-bar'
    When I successfully run tails-custom-apt-sources
    Then I should see the 'stable' suite
    And I should see the 'bugfix-disable-gdomap' suite
    And I should see the 'bugfix-bar' suite
    But I should not see the '0.10' suite

  Scenario: build from a bugfix branch with no encoded time-based snapshot for a stable release
    Given Tails 0.10 has been released
    And the last version mentioned in debian/changelog is 0.10.1
    And Tails 0.10.1 has not been released yet
    And I am working on the bugfix/disable_gdomap branch based on stable
    And no frozen APT snapshot is encoded in config/APT_snapshots.d
    When I successfully run "apt-snapshots-serials prepare-build"
    And I run "apt-mirror debian"
    Then it should fail
    When I run "apt-mirror torproject"
    Then it should fail
    When I successfully run "apt-mirror debian-security"
    Then I should see a time-based snapshot

  Scenario: build from a bugfix branch with encoded time-based snapshots for a stable release
    Given Tails 0.10 has been released
    And the last version mentioned in debian/changelog is 0.10.1
    And Tails 0.10.1 has not been released yet
    And I am working on the bugfix/disable_gdomap branch based on stable
    And frozen APT snapshots are encoded in config/APT_snapshots.d
    When I successfully run "apt-snapshots-serials prepare-build"
    And I successfully run "apt-mirror debian"
    Then I should see a time-based snapshot
    When I successfully run "apt-mirror torproject"
    Then I should see a time-based snapshot
    When I successfully run "apt-mirror debian-security"
    Then I should see a time-based snapshot

  Scenario: build from an untagged testing branch where the config/APT_overlays.d directory is empty
    Given I am working on the testing base branch
    And the last version mentioned in debian/changelog is 0.11
    And Tails 0.11 has not been released yet
    And the config/APT_overlays.d directory is empty
    When I successfully run tails-custom-apt-sources
    Then I should see the 'testing' suite
    And I should not see the '0.11' suite
    And I should not see the 'feature-foo' suite
    And I should not see the 'bugfix-bar' suite

  Scenario: build from an untagged testing branch where config/APT_overlays.d is not empty
    Given I am working on the testing base branch
    And the last version mentioned in debian/changelog is 0.11
    And Tails 0.11 has not been released yet
    And config/APT_overlays.d contains 'feature-foo'
    And config/APT_overlays.d contains 'bugfix-bar'
    When I successfully run tails-custom-apt-sources
    Then I should see the 'testing' suite
    And I should see the 'feature-foo' suite
    And I should see the 'bugfix-bar' suite
    But I should not see the '0.11' suite

  Scenario: build from an untagged testing branch with no encoded time-based snapshot
    Given I am working on the testing base branch
    And Tails 0.10 has been released
    And the last versions mentioned in debian/changelog are 0.10 and 1.0
    And Tails 1.0 has not been released yet
    And no frozen APT snapshot is encoded in config/APT_snapshots.d
    When I successfully run "apt-snapshots-serials prepare-build"
    And I run "apt-mirror debian"
    Then it should fail
    When I run "apt-mirror torproject"
    Then it should fail
    When I successfully run "apt-mirror debian-security"
    Then I should see a time-based snapshot

  Scenario: build from an untagged testing branch with encoded time-based snapshots
    Given I am working on the testing base branch
    And Tails 0.10 has been released
    And the last versions mentioned in debian/changelog are 0.10 and 1.0
    And Tails 1.0 has not been released yet
    And frozen APT snapshots are encoded in config/APT_snapshots.d
    When I successfully run "apt-snapshots-serials prepare-build"
    And I successfully run "apt-mirror debian"
    Then I should see a time-based snapshot
    When I successfully run "apt-mirror torproject"
    Then I should see a time-based snapshot
    When I successfully run "apt-mirror debian-security"
    Then I should see a time-based snapshot

  Scenario: build from a tagged testing branch where the config/APT_overlays.d directory is empty
    Given I am working on the testing base branch
    And the last version mentioned in debian/changelog is 0.11
    And Tails 0.11 has been released
    And the config/APT_overlays.d directory is empty
    And I checkout the 0.11 tag
    When I successfully run tails-custom-apt-sources
    Then I should see only the '0.11' suite

  Scenario: build from a tagged testing branch where config/APT_overlays.d is not empty
    Given I am working on the testing base branch
    And the last version mentioned in debian/changelog is 0.11
    And Tails 0.11 has been released
    And config/APT_overlays.d contains 'feature-foo'
    And I checkout the 0.11 tag
    When I run tails-custom-apt-sources
    Then it should fail

  Scenario: build from a tagged testing branch with no encoded time-based snapshot
    Given I am working on the testing base branch
    And the last version mentioned in debian/changelog is 0.11
    And Tails 0.11 has been released
    And no frozen APT snapshot is encoded in config/APT_snapshots.d
    And I checkout the 0.11 tag
    When I successfully run "apt-snapshots-serials prepare-build"
    And I run "apt-mirror debian"
    Then it should fail
    When I run "apt-mirror torproject"
    Then it should fail
    When I successfully run "apt-mirror debian-security"
    Then I should see the 0.11 tagged snapshot

  Scenario: build from a tagged testing branch with encoded time-based snapshots
    Given I am working on the testing base branch
    And the last version mentioned in debian/changelog is 0.11
    And Tails 0.11 has been released
    And frozen APT snapshots are encoded in config/APT_snapshots.d
    And I checkout the 0.11 tag
    When I successfully run "apt-snapshots-serials prepare-build"
    And I successfully run "apt-mirror debian"
    Then I should see the 0.11 tagged snapshot
    When I successfully run "apt-mirror torproject"
    Then I should see the 0.11 tagged snapshot
    When I successfully run "apt-mirror debian-security"
    Then I should see the 0.11 tagged snapshot

  Scenario: build a release candidate from a tagged testing branch
    Given I am working on the testing base branch
    And Tails 0.11 has been released
    And the last version mentioned in debian/changelog is 0.12~rc1
    And Tails 0.12-rc1 has been tagged
    And the config/APT_overlays.d directory is empty
    And I checkout the 0.12-rc1 tag
    When I successfully run tails-custom-apt-sources
    Then I should see only the '0.12-rc1' suite

  Scenario: build a release candidate from a tagged testing branch where config/APT_overlays.d is not empty
    Given I am working on the testing base branch
    And Tails 0.11 has been released
    And the last version mentioned in debian/changelog is 0.12~rc1
    And Tails 0.12-rc1 has been tagged
    And config/APT_overlays.d contains 'bugfix-bar'
    And I checkout the 0.12-rc1 tag
    When I run tails-custom-apt-sources
    Then it should fail

  Scenario: build from a bugfix branch with no encoded time-based snapshot for a major release
    Given I am working on the testing base branch
    And Tails 0.10~rc1 has been released
    And the last versions mentioned in debian/changelog are 0.10~rc1 and 0.10
    And Tails 0.10 has not been released yet
    And I am working on the bugfix/disable_gdomap branch based on testing
    And no frozen APT snapshot is encoded in config/APT_snapshots.d
    When I successfully run "apt-snapshots-serials prepare-build"
    And I run "apt-mirror debian"
    Then it should fail
    When I run "apt-mirror torproject"
    Then it should fail
    When I successfully run "apt-mirror debian-security"
    Then I should see a time-based snapshot

  Scenario: build from a bugfix branch with encoded time-based snapshots for a major release
    Given I am working on the testing base branch
    And Tails 0.10~rc1 has been released
    And the last versions mentioned in debian/changelog are 0.10~rc1 and 0.10
    And Tails 0.10 has not been released yet
    And I am working on the bugfix/disable_gdomap branch based on testing
    And frozen APT snapshots are encoded in config/APT_snapshots.d
    When I successfully run "apt-snapshots-serials prepare-build"
    And I successfully run "apt-mirror debian"
    Then I should see a time-based snapshot
    When I successfully run "apt-mirror torproject"
    Then I should see a time-based snapshot
    When I successfully run "apt-mirror debian-security"
    Then I should see a time-based snapshot

  Scenario: build from the devel branch without overlays
    Given I am working on the devel base branch
    And the config/APT_overlays.d directory is empty
    When I successfully run tails-custom-apt-sources
    Then I should see only the 'devel' suite

  Scenario: build from the devel branch with overlays
    Given I am working on the devel base branch
    And config/APT_overlays.d contains 'feature-foo'
    And config/APT_overlays.d contains 'bugfix-bar'
    When I successfully run tails-custom-apt-sources
    Then I should see the 'devel' suite
    And I should see the 'feature-foo' suite
    And I should see the 'bugfix-bar' suite

  Scenario: build from the devel branch with no encoded time-based snapshot
    Given I am working on the devel base branch
    And no frozen APT snapshot is encoded in config/APT_snapshots.d
    When I successfully run "apt-snapshots-serials prepare-build"
    And I successfully run "apt-mirror debian"
    Then I should see a time-based snapshot
    When I successfully run "apt-mirror torproject"
    Then I should see a time-based snapshot
    When I successfully run "apt-mirror debian-security"
    Then I should see a time-based snapshot

  Scenario: build from the devel branch with encoded time-based snapshots
    Given I am working on the devel base branch
    And frozen APT snapshots are encoded in config/APT_snapshots.d
    When I successfully run "apt-snapshots-serials prepare-build"
    And I run "apt-mirror debian"
    Then it should fail
    When I run "apt-mirror torproject"
    Then it should fail
    When I successfully run "apt-mirror debian-security"
    Then I should see a time-based snapshot

  Scenario: build from the feature/jessie branch without overlays
    Given I am working on the feature/jessie base branch
    And the config/APT_overlays.d directory is empty
    When I successfully run tails-custom-apt-sources
    Then I should see only the 'feature-jessie' suite

  Scenario: build from the feature/jessie branch with overlays
    Given I am working on the feature/jessie base branch
    And config/APT_overlays.d contains 'feature-7756-reintroduce-whisperback'
    When I successfully run tails-custom-apt-sources
    Then I should see the 'feature-jessie' suite
    And I should see the 'feature-7756-reintroduce-whisperback' suite

  Scenario: build from a feature branch with overlays based on devel
    Given I am working on the feature/icedove branch based on devel
    And config/APT_overlays.d contains 'feature-icedove'
    And config/APT_overlays.d contains 'bugfix-bar'
    When I successfully run tails-custom-apt-sources
    Then I should see the 'devel' suite
    And I should see the 'feature-icedove' suite
    And I should see the 'bugfix-bar' suite

  Scenario: build from a feature branch without overlays based on devel
    Given I am working on the feature/icedove branch based on devel
    And the config/APT_overlays.d directory is empty
    When I successfully run tails-custom-apt-sources
    Then I should see only the 'devel' suite

  Scenario: build from a feature branch based on devel with no encoded time-based snapshot
    Given I am working on the feature/icedove branch based on devel
    And no frozen APT snapshot is encoded in config/APT_snapshots.d
    When I successfully run "apt-snapshots-serials prepare-build"
    And I successfully run "apt-mirror debian"
    Then I should see a time-based snapshot
    When I successfully run "apt-mirror torproject"
    Then I should see a time-based snapshot
    When I successfully run "apt-mirror debian-security"
    Then I should see a time-based snapshot

  Scenario: build from a feature branch based on devel with encoded time-based snapshots
    Given I am working on the feature/icedove branch based on devel
    And frozen APT snapshots are encoded in config/APT_snapshots.d
    When I successfully run "apt-snapshots-serials prepare-build"
    And I run "apt-mirror debian"
    Then it should fail
    When I run "apt-mirror torproject"
    Then it should fail
    When I successfully run "apt-mirror debian-security"
    Then I should see a time-based snapshot

  Scenario: build from a feature branch with overlays based on feature/jessie
    Given I am working on the feature/7756-reintroduce-whisperback branch based on feature/jessie
    And config/APT_overlays.d contains 'feature-7756-reintroduce-whisperback'
    And config/APT_overlays.d contains 'bugfix-bar'
    When I successfully run tails-custom-apt-sources
    Then I should see the 'feature-jessie' suite
    And I should see the 'feature-7756-reintroduce-whisperback' suite
    And I should see the 'bugfix-bar' suite

  Scenario: build from a feature branch without overlays based on feature/jessie
    Given I am working on the feature/icedove branch based on feature/jessie
    And the config/APT_overlays.d directory is empty
    When I successfully run tails-custom-apt-sources
    Then I should see only the 'feature-jessie' suite

  Scenario: build from a feature branch based on devel with dots in its name
    Given I am working on the feature/live-boot-3.x branch based on devel
    And config/APT_overlays.d contains 'feature-live-boot-3.x'
    When I successfully run tails-custom-apt-sources
    Then I should see the 'devel' suite
    And I should see the 'feature-live-boot-3.x' suite

  Scenario: build from a branch that has no config/APT_overlays.d directory
    Given I am working on the stable base branch
    And the config/APT_overlays.d directory does not exist
    When I run tails-custom-apt-sources
    Then it should fail

  Scenario: build from a branch that has no config/base_branch file
    Given I am working on the stable base branch
    And the config/base_branch file does not exist
    When I run tails-custom-apt-sources
    Then it should fail

  Scenario: build from a branch where config/base_branch is empty
    Given I am working on the stable base branch
    And the config/base_branch file is empty
    When I run tails-custom-apt-sources
    Then it should fail