forked from canonical/snapd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spread.yaml
813 lines (774 loc) · 29.4 KB
/
spread.yaml
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
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
project: snapd
environment:
GOHOME: /home/gopath
GOPATH: $GOHOME
REUSE_PROJECT: "$(HOST: echo $REUSE_PROJECT)"
PROJECT_PATH: $GOHOME/src/github.com/snapcore/snapd
# /usr/lib/go-1.6/bin for trusty (needs to be last as we use
# a different go in gccgo tests)
PATH: $GOHOME/bin:/snap/bin:$PATH:/usr/lib/go-1.6/bin:/var/lib/snapd/snap/bin
TESTSLIB: $PROJECT_PATH/tests/lib
SNAPPY_TESTING: 1
# we run the entire suite with re-exec on (the default) and modify
# the core snap so that it contains our new code. So we run new
# snapd from the deb that re-execs into new snapd in core. To
# test purely from the deb, set "export SPREAD_SNAP_REEXEC=0"
SNAP_REEXEC: "$(HOST: echo ${SPREAD_SNAP_REEXEC:-})"
MODIFY_CORE_SNAP_FOR_REEXEC: "$(HOST: echo ${SPREAD_MODIFY_CORE_SNAP_FOR_REEXEC:-1})"
SPREAD_STORE_USER: "$(HOST: echo $SPREAD_STORE_USER)"
SPREAD_STORE_PASSWORD: "$(HOST: echo $SPREAD_STORE_PASSWORD)"
SPREAD_STORE_EXPIRED_MACAROON: "$(HOST: echo $SPREAD_STORE_EXPIRED_MACAROON)"
SPREAD_STORE_EXPIRED_DISCHARGE: "$(HOST: echo $SPREAD_STORE_EXPIRED_DISCHARGE)"
SPREAD_DEBUG_EACH: "$(HOST: echo ${SPREAD_DEBUG_EACH:-1})"
LANG: "C.UTF-8"
LANGUAGE: "en"
# important to ensure adhoc and linode/qemu behave the same
SUDO_USER: ""
SUDO_UID: ""
TRUST_TEST_KEYS: "$(HOST: echo ${SPREAD_TRUST_TEST_KEYS:-true})"
MANAGED_DEVICE: "false"
CORE_CHANNEL: "$(HOST: echo ${SPREAD_CORE_CHANNEL:-edge})"
KERNEL_CHANNEL: "$(HOST: echo ${SPREAD_KERNEL_CHANNEL:-edge})"
GADGET_CHANNEL: "$(HOST: echo ${SPREAD_GADGET_CHANNEL:-edge})"
SNAPD_CHANNEL: "$(HOST: echo ${SPREAD_SNAPD_CHANNEL:-edge})"
REMOTE_STORE: "$(HOST: echo ${SPREAD_REMOTE_STORE:-production})"
SNAPPY_USE_STAGING_STORE: "$(HOST: if [ $SPREAD_REMOTE_STORE = staging ]; then echo 1; else echo 0; fi)"
DELTA_REF: 2.37.4
DELTA_PREFIX: snapd-$DELTA_REF/
SNAPD_PUBLISHED_VERSION: "$(HOST: echo $SPREAD_SNAPD_PUBLISHED_VERSION)"
HTTP_PROXY: "$(HOST: echo $SPREAD_HTTP_PROXY)"
HTTPS_PROXY: "$(HOST: echo $SPREAD_HTTPS_PROXY)"
NO_PROXY: "127.0.0.1"
NEW_CORE_CHANNEL: "$(HOST: echo $SPREAD_NEW_CORE_CHANNEL)"
SRU_VALIDATION: "$(HOST: echo ${SPREAD_SRU_VALIDATION:-0})"
PRE_CACHE_SNAPS: core ubuntu-core test-snapd-tools
# always skip removing the rsync snap
SKIP_REMOVE_SNAPS: "$(HOST: echo ${SPREAD_SKIP_REMOVE_SNAPS:-}) test-snapd-rsync test-snapd-rsync-core18"
backends:
google:
key: "$(HOST: echo $SPREAD_GOOGLE_KEY)"
location: computeengine/us-east1-b
halt-timeout: 2h
systems:
- ubuntu-14.04-64:
workers: 6
- ubuntu-16.04-32:
workers: 6
- ubuntu-16.04-64:
workers: 8
- ubuntu-18.04-64:
workers: 6
- ubuntu-18.10-64:
image: ubuntu-1810
workers: 6
- ubuntu-core-16-64:
image: ubuntu-16.04-64
workers: 6
- ubuntu-core-18-64:
image: ubuntu-16.04-64
workers: 6
- debian-9-64:
workers: 6
- debian-sid-64:
workers: 6
- fedora-28-64:
workers: 4
manual: true
- fedora-29-64:
workers: 6
- opensuse-42.3-64:
workers: 4
# golang stack cannot compile anything, needs investigation
manual: true
- opensuse-15.0-64:
workers: 4
- opensuse-tumbleweed-64:
workers: 4
# tumbleweed image not available at the moment
manual: true
- arch-linux-64:
workers: 4
- amazon-linux-2-64:
workers: 4
storage: preserve-size
- centos-7-64:
workers: 4
image: centos-7-64
google-upgrade:
type: google
key: "$(HOST: echo $SPREAD_GOOGLE_KEY)"
location: computeengine/us-east1-b
halt-timeout: 2h
systems:
- ubuntu-14.04-64:
workers: 1
- ubuntu-16.04-32:
workers: 1
- ubuntu-16.04-64:
workers: 1
- ubuntu-18.04-64:
workers: 1
- ubuntu-18.10-64:
image: ubuntu-1810
workers: 1
- debian-9-64:
workers: 1
- fedora-29-64:
workers: 1
- arch-linux-64:
workers: 1
- amazon-linux-2-64:
workers: 1
storage: preserve-size
- centos-7-64:
workers: 1
google-sru:
type: google
key: "$(HOST: echo $SPREAD_GOOGLE_KEY)"
location: computeengine/us-east1-b
halt-timeout: 2h
systems:
- ubuntu-14.04-64:
workers: 4
- ubuntu-16.04-64:
workers: 4
- ubuntu-18.04-64:
workers: 4
- ubuntu-18.10-64:
image: ubuntu-1810
workers: 4
google-nested:
type: google
key: "$(HOST: echo $SPREAD_GOOGLE_KEY)"
location: computeengine/us-east1-b
plan: n1-standard-2
halt-timeout: 2h
systems:
- ubuntu-16.04-64:
image: ubuntu-1604-64-virt-enabled
workers: 1
- ubuntu-18.04-64:
image: ubuntu-1804-64-virt-enabled
workers: 1
qemu:
systems:
- ubuntu-14.04-32:
username: ubuntu
password: ubuntu
- ubuntu-14.04-64:
username: ubuntu
password: ubuntu
- ubuntu-16.04-32:
username: ubuntu
password: ubuntu
- ubuntu-16.04-64:
username: ubuntu
password: ubuntu
- ubuntu-core-16-64:
image: ubuntu-16.04-64
username: ubuntu
password: ubuntu
- ubuntu-core-18-64:
image: ubuntu-16.04-64
username: ubuntu
password: ubuntu
- ubuntu-17.10-64:
username: ubuntu
password: ubuntu
- ubuntu-18.04-64:
username: ubuntu
password: ubuntu
- ubuntu-18.04-32:
username: ubuntu
password: ubuntu
- ubuntu-18.10-64:
username: ubuntu
password: ubuntu
- ubuntu-18.10-32:
username: ubuntu
password: ubuntu
- ubuntu-19.04-64:
username: ubuntu
password: ubuntu
- ubuntu-19.04-32:
username: ubuntu
password: ubuntu
- ubuntu-19.10-64:
username: ubuntu
password: ubuntu
- ubuntu-19.10-32:
username: ubuntu
password: ubuntu
- ubuntu-20.04-64:
username: ubuntu
password: ubuntu
- ubuntu-20.04-32:
username: ubuntu
password: ubuntu
- debian-sid-64:
username: debian
password: debian
- debian-9-64:
username: debian
password: debian
- debian-sid-64:
username: debian
password: debian
- fedora-27-64:
username: fedora
password: fedora
- fedora-28-64:
username: fedora
password: fedora
autopkgtest:
type: adhoc
allocate: |
echo "Allocating ad-hoc $SPREAD_SYSTEM"
if [ -z "${ADT_ARTIFACTS}" ]; then
FATAL "adhoc only works inside autopkgtest"
exit 1
fi
echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/99-spread-users
ADDRESS localhost:22
discard: |
echo "Discarding ad-hoc $SPREAD_SYSTEM"
systems:
# Trusty
- ubuntu-14.04-amd64:
username: ubuntu
password: ubuntu
- ubuntu-14.04-i386:
username: ubuntu
password: ubuntu
# Xenial
- ubuntu-16.04-amd64:
username: ubuntu
password: ubuntu
- ubuntu-16.04-i386:
username: ubuntu
password: ubuntu
- ubuntu-16.04-ppc64el:
username: ubuntu
password: ubuntu
- ubuntu-16.04-armhf:
username: ubuntu
password: ubuntu
- ubuntu-16.04-s390x:
username: ubuntu
password: ubuntu
# Artful
- ubuntu-17.10-amd64:
username: ubuntu
password: ubuntu
- ubuntu-17.10-i386:
username: ubuntu
password: ubuntu
- ubuntu-17.10-ppc64el:
username: ubuntu
password: ubuntu
- ubuntu-17.10-armhf:
username: ubuntu
password: ubuntu
- ubuntu-17.10-s390x:
username: ubuntu
password: ubuntu
# Bionic
- ubuntu-18.04-amd64:
username: ubuntu
password: ubuntu
- ubuntu-18.04-i386:
username: ubuntu
password: ubuntu
- ubuntu-18.04-ppc64el:
username: ubuntu
password: ubuntu
- ubuntu-18.04-armhf:
username: ubuntu
password: ubuntu
- ubuntu-18.04-s390x:
username: ubuntu
password: ubuntu
- ubuntu-18.04-arm64:
username: ubuntu
password: ubuntu
# Cosmic
- ubuntu-18.10-amd64:
username: ubuntu
password: ubuntu
- ubuntu-18.10-i386:
username: ubuntu
password: ubuntu
- ubuntu-18.10-ppc64el:
username: ubuntu
password: ubuntu
- ubuntu-18.10-armhf:
username: ubuntu
password: ubuntu
- ubuntu-18.10-s390x:
username: ubuntu
password: ubuntu
- ubuntu-18.10-arm64:
username: ubuntu
password: ubuntu
# Disco
- ubuntu-19.04-amd64:
username: ubuntu
password: ubuntu
- ubuntu-19.04-i386:
username: ubuntu
password: ubuntu
- ubuntu-19.04-ppc64el:
username: ubuntu
password: ubuntu
- ubuntu-19.04-armhf:
username: ubuntu
password: ubuntu
- ubuntu-19.04-s390x:
username: ubuntu
password: ubuntu
- ubuntu-19.04-arm64:
username: ubuntu
password: ubuntu
# Eccentric Eel (not final name!)
- ubuntu-19.10-amd64:
username: ubuntu
password: ubuntu
- ubuntu-19.10-i386:
username: ubuntu
password: ubuntu
- ubuntu-19.10-ppc64el:
username: ubuntu
password: ubuntu
- ubuntu-19.10-armhf:
username: ubuntu
password: ubuntu
- ubuntu-19.10-s390x:
username: ubuntu
password: ubuntu
- ubuntu-19.10-arm64:
username: ubuntu
password: ubuntu
# Flaming Falcon (not final name!)
- ubuntu-20.04-amd64:
username: ubuntu
password: ubuntu
- ubuntu-20.04-i386:
username: ubuntu
password: ubuntu
- ubuntu-20.04-ppc64el:
username: ubuntu
password: ubuntu
- ubuntu-20.04-armhf:
username: ubuntu
password: ubuntu
- ubuntu-20.04-s390x:
username: ubuntu
password: ubuntu
- ubuntu-20.04-arm64:
username: ubuntu
password: ubuntu
external:
type: adhoc
environment:
SPREAD_EXTERNAL_ADDRESS: "$(HOST: echo ${SPREAD_EXTERNAL_ADDRESS:-localhost:8022})"
MANAGED_DEVICE: "true"
TRUST_TEST_KEYS: "false"
allocate: |
ADDRESS $SPREAD_EXTERNAL_ADDRESS
systems:
- ubuntu-core-16-64:
username: test
password: ubuntu
- ubuntu-core-16-32:
username: test
password: ubuntu
- ubuntu-core-16-arm-64:
username: test
password: ubuntu
- ubuntu-core-16-arm-32:
username: test
password: ubuntu
- ubuntu-core-18-64:
username: test
password: ubuntu
- ubuntu-core-18-32:
username: test
password: ubuntu
- ubuntu-core-18-arm-64:
username: test
password: ubuntu
- ubuntu-core-18-arm-32:
username: test
password: ubuntu
path: /home/gopath/src/github.com/snapcore/snapd
exclude:
- .git
- cmd/snap/snap
- cmd/snapd/snapd
- cmd/snapctl/snapctl
- cmd/snap-exec/snap-exec
- "*.o"
- "*.a"
debug-each: |
if [ "$SPREAD_DEBUG_EACH" = 1 ]; then
# shellcheck source=tests/lib/journalctl.sh
. "$TESTSLIB/journalctl.sh"
#shellcheck source=tests/lib/state.sh
. "$TESTSLIB/state.sh"
echo '# journal messages for snapd'
get_journalctl_log -u snapd
case "$SPREAD_SYSTEM" in
fedora-*|centos-*|amazon-*)
if [ -e "$RUNTIME_STATE_PATH/audit-stamp" ]; then
ausearch -m AVC --checkpoint "$RUNTIME_STATE_PATH/audit-stamp" --start checkpoint || true
else
ausearch -m AVC || true
fi
;;
*)
echo '# apparmor denials '
dmesg --ctime | grep DENIED || true
;;
esac
echo '# seccomp denials (kills) '
dmesg --ctime | grep type=1326 || true
echo '# snap interfaces'
snap interfaces || true
echo '# tasks executed on system'
cat "$RUNTIME_STATE_PATH/runs" || true
echo '# free space'
df -h || true
fi
rename:
# Move content into a directory, so that deltas computed by repack benefit
# from the content looking similar to codeload.github.com.
- s,^,$DELTA_PREFIX,S
repack: |
# For Linode, compute a delta based on a known git reference that can be
# obtained directly from GitHub. There's nothing special about that reference,
# other than it will often be in the local repository's history already.
# The more recent the reference, the smaller the delta.
if ! echo "$SPREAD_BACKENDS" | grep linode; then
cat <&3 >&4
elif ! git show-ref "$DELTA_REF" > /dev/null; then
cat <&3 >&4
else
trap "rm -f delta-ref.tar current.delta" EXIT
git archive -o delta-ref.tar --format=tar --prefix="$DELTA_PREFIX" "$DELTA_REF"
xdelta3 -s delta-ref.tar <&3 > current.delta
tar c current.delta >&4
fi
kill-timeout: 30m
prepare: |
# NOTE: This part of the code needs to be in spread.yaml as it runs before
# the rest of the source code (including the tests/lib directory) is
# around. The purpose of this code is to fix some connectivity issues and
# then apply the delta of the git repository.
# apt update is hanging on security.ubuntu.com with IPv6, prefer IPv4 over IPv6
cat <<EOF > gai.conf
precedence ::1/128 50
precedence ::/0 40
precedence 2002::/16 30
precedence ::/96 20
precedence ::ffff:0:0/96 100
EOF
if ! mv gai.conf /etc/gai.conf; then
echo "/etc/gai.conf is not writable, ubuntu-core system? apt update won't be affected in that case"
rm -f gai.conf
fi
if [[ "$SPREAD_SYSTEM" == fedora-* ]]; then
# The Fedora archive mirror seems to be unreliable.
# Switch to the main archive by commenting out metalink and uncommenting
# baseurl with a tweak to go to dl.fedoraproject.org which doens't redirect
# to mirrors again.
#
# https://forum.snapcraft.io/t/issues-with-the-fedora-mirror-network/3489/
sed -i -s -E -e 's@^#?baseurl=http://download.fedoraproject.org/@baseurl=http://dl.fedoraproject.org/@g' -e 's@^metalink=@#metalink@g' /etc/yum.repos.d/fedora*.repo
dnf --refresh -y makecache
# enable audit daemon
systemctl enable --now auditd.service
fi
if [[ "$SPREAD_SYSTEM" == opensuse-* ]]; then
# We seem to be hitting a flaky openSUSE mirror from time to time,
# increase the number of download attempts libzypp will try to
# workaround that.
cat <<-EOF >> /etc/zypp/zypp.conf
# added by spread tests
download.max_silent_tries = 20
EOF
fi
if [[ "$SPREAD_SYSTEM" == arch-* ]]; then
# Possible that AppArmor was not started and is not enabled in the
# image, do both now
if systemctl show -p LoadState apparmor.service | MATCH 'LoadState=loaded' ; then
if ! systemctl is-enabled apparmor.service; then
systemctl enable apparmor.service
fi
systemctl start apparmor.service
else
exit 1
fi
fi
# Unpack delta, or move content out of the prefixed directory (see rename and repack above).
# (needs to be in spread.yaml directly because there's nothing else on the filesystem yet)
if [ -f current.delta ]; then
tf=$(mktemp)
# NOTE: We can't use tests/lib/pkgdb.sh here as it doesn't exist at
# this time when none of the test files is yet in place.
case "$SPREAD_SYSTEM" in
ubuntu-*|debian-*)
apt-get update >& "$tf" || ( cat "$tf"; exit 1 )
apt-get install -y xdelta3 curl >& "$tf" || ( cat "$tf"; exit 1 )
;;
fedora-*)
dnf install --refresh -y xdelta curl &> "$tf" || (cat "$tf"; exit 1)
;;
amazon-*|centos-*)
yum install -y xdelta curl &> "$tf" || (cat "$tf"; exit 1)
;;
opensuse-*)
zypper -q --gpg-auto-import-keys refresh
zypper -q install -y xdelta3 curl &> "$tf" || (cat "$tf"; exit 1)
;;
arch-*)
# NOTE: we ought to do pacman -Syu, but this may update the
# kernel which we will not detect at this stage and fail to
# reboot; actual distro upgrade is done later in prepare
pacman -Sy --noconfirm xdelta3 curl &> "$tf" || (cat "$tf"; exit 1)
;;
esac
rm -f "$tf"
curl -sS -o - "https://codeload.github.com/snapcore/snapd/tar.gz/$DELTA_REF" | gunzip > delta-ref.tar
xdelta3 -q -d -s delta-ref.tar current.delta | tar x --strip-components=1
rm -f delta-ref.tar current.delta
elif [ -d "$DELTA_PREFIX" ]; then
find "$DELTA_PREFIX" -mindepth 1 -maxdepth 1 -exec mv {} . \;
rmdir "$DELTA_PREFIX"
fi
# Take the MATCH and REBOOT functions from spread and allow our shell scripts to use them.
type MATCH | tail -n +2 > "$TESTSLIB"/spread-funcs.sh
type REBOOT | tail -n +2 >> "$TESTSLIB"/spread-funcs.sh
if [ -e /etc/profile.d/go.sh ]; then
# Up until recently openSUSE golang packaging injected environment
# variables into the global shell profile. This caused issues across
# updates and was, in fact, entirely useless. As such, if we are
# working against an older image that still has that file, we can
# remove it and unset certain variables to avoid the problem.
unset GOBIN
unset GOARCH
unset GOROOT
unset GOOS
rm -f /etc/profile.d/go.sh
fi
# NOTE: At this stage the source tree is available and no more special
# considerations apply.
"$TESTSLIB"/prepare-restore.sh --prepare-project
prepare-each: |
"$TESTSLIB"/prepare-restore.sh --prepare-project-each
restore: |
"$TESTSLIB"/prepare-restore.sh --restore-project
restore-each: |
"$TESTSLIB"/prepare-restore.sh --restore-project-each
if journalctl -u snapd.service | grep -F "signal: terminated"; then exit 1; fi
suites:
tests/main/:
summary: Full-system tests for snapd
prepare: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite
debug: |
systemctl status snapd.socket || true
journalctl -xe
prepare-each: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite-each
restore-each: |
"$TESTSLIB"/prepare-restore.sh --restore-suite-each
restore: |
"$TESTSLIB"/prepare-restore.sh --restore-suite
# Essential tests run inside the autopkgtest environment on each
# platform. Autopkgtest can be very slow so we cannot run all
# tests there without running into timeouts.
tests/smoke/:
summary: Essenial system level tests for snapd
prepare: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite
prepare-each: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite-each
restore-each: |
"$TESTSLIB"/prepare-restore.sh --restore-suite-each
restore: |
"$TESTSLIB"/prepare-restore.sh --restore-suite
tests/core18/:
summary: Subset of core18 specific tests
systems: [ubuntu-core-18-*]
prepare: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite
prepare-each: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite-each
restore-each: |
"$TESTSLIB"/prepare-restore.sh --restore-suite-each
restore: |
"$TESTSLIB"/prepare-restore.sh --restore-suite
tests/completion/:
summary: completion tests
# ppc64el disabled because of https://bugs.launchpad.net/snappy/+bug/1655594
systems: [-ubuntu-core-*, -ubuntu-*-ppc64el]
prepare: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite
prepare-each: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite-each
restore-each: |
"$TESTSLIB"/prepare-restore.sh --restore-suite-each
restore: |
"$TESTSLIB"/prepare-restore.sh --restore-suite
environment:
_/plain: _
_/plain_plusdirs: _
_/funky: _
_/files: _
# dirs fails on indirection because of (mis)handling of trailing
# slashes. This might be configuration-dependent.
# _/dirs: _
_/hosts: _
_/hosts_n_dirs: _
# twisted fails in travis (but not regular spread).
# _/twisted: _
_/func: _
_/funkyfunc: _
_/funcarg: _
tests/regression/:
summary: Regression tests for snapd
prepare: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite
prepare-each: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite-each
restore-each: |
"$TESTSLIB"/prepare-restore.sh --restore-suite-each
restore: |
"$TESTSLIB"/prepare-restore.sh --restore-suite
tests/upgrade/:
summary: Tests for snapd upgrade
# Test cases are not yet ported to openSUSE that is why we keep
# it disabled. A later PR will enable most tests and
# drop this blacklist.
systems: [-ubuntu-core-*, -opensuse-*]
# autopkgtest runs against localhost which causes problems with
# this test prepare
backends: [google-upgrade]
prepare-each: |
# FIXME: this should really use prepare-restore.sh --prepare-suite-each
# like other suites, needs more investigation
# shellcheck source=tests/lib/state.sh
. "$TESTSLIB"/state.sh
mkdir -p "$RUNTIME_STATE_PATH"
# save the job which is going to be executed in the system
echo -n "$SPREAD_JOB " >> "$RUNTIME_STATE_PATH/runs"
restore: |
if [ "$REMOTE_STORE" = staging ]; then
echo "skip upgrade tests while talking to the staging store"
exit 0
fi
restore-each: |
if [ "$REMOTE_STORE" = staging ]; then
echo "skip upgrade tests while talking to the staging store"
exit 0
fi
#shellcheck source=tests/lib/pkgdb.sh
. "$TESTSLIB"/pkgdb.sh
distro_purge_package snapd
distro_purge_package snapd-xdg-open || true
tests/cross/:
summary: Cross-compile tests
systems: [ubuntu-16.04-64, ubuntu-18.04-64]
tests/unit/:
summary: Suite to run unit tests (non-go and different go runtimes)
# Test cases are not yet ported to Fedora/openSUSE/Arch that is why
# we keep them disabled. A later PR will enable most tests and
# drop this blacklist.
systems: [-ubuntu-core-*, -fedora-*, -opensuse-*, -arch-*, -amazon-*, -centos-*]
# unittests are run as part of the autopkgtest build already
backends: [-autopkgtest]
environment:
# env vars required for coverage reporting from a spread task
TRAVIS_BUILD_NUMBER: "$(HOST: echo $TRAVIS_BUILD_NUMBER)"
TRAVIS_BRANCH: "$(HOST: echo $TRAVIS_BRANCH)"
TRAVIS_COMMIT: "$(HOST: echo $TRAVIS_COMMIT)"
TRAVIS_JOB_NUMBER: "$(HOST: echo $TRAVIS_JOB_NUMBER)"
TRAVIS_PULL_REQUEST: "$(HOST: echo $TRAVIS_PULL_REQUEST)"
TRAVIS_JOB_ID: "$(HOST: echo $TRAVIS_JOB_ID)"
TRAVIS_REPO_SLUG: "$(HOST: echo $TRAVIS_REPO_SLUG)"
TRAVIS_TAG: "$(HOST: echo $TRAVIS_TAG)"
COVERMODE: "$(HOST: echo $COVERMODE)"
prepare: |
#shellcheck source=tests/lib/prepare.sh
. "$TESTSLIB"/prepare.sh
prepare_classic
prepare-each: |
"$TESTSLIB"/reset.sh --reuse-core
#shellcheck source=tests/lib/prepare.sh
. "$TESTSLIB"/prepare.sh
prepare_each_classic
restore: |
"$TESTSLIB"/reset.sh --store
#shellcheck source=tests/lib/pkgdb.sh
. "$TESTSLIB"/pkgdb.sh
distro_purge_package snapd
case "$SPREAD_SYSTEM" in
arch-*)
# there is no snap-confine and ubuntu-core-launcher
# in Arch
;;
*)
distro_purge_package snap-confine ubuntu-core-launcher
;;
esac
tests/nightly/:
summary: Suite for nightly, expensive, tests
manual: true
# Test cases are not yet ported to Fedora/openSUSE/Arch/AMZN2 that is why
# we keep them disabled. A later PR will enable most tests and
# drop this blacklist.
systems: [-fedora-*, -opensuse-*, -arch-*, -amazon-*, -centos-*]
prepare: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite
prepare-each: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite-each
restore-each: |
"$TESTSLIB"/prepare-restore.sh --restore-suite-each
restore: |
"$TESTSLIB"/prepare-restore.sh --restore-suite
tests/nested/classic/:
summary: Tests for nested images
backends: [google-nested]
environment:
NESTED_ARCH: "$(HOST: echo ${SPREAD_NESTED_ARCH:-amd64})"
NESTED_SYSTEM: "$(HOST: echo ${SPREAD_NESTED_SYSTEM:-xenial})"
CORE_CHANNEL: "$(HOST: echo ${SPREAD_CORE_CHANNEL:-stable})"
CORE_REFRESH_CHANNEL: "$(HOST: echo ${SPREAD_CORE_REFRESH_CHANNEL:-edge})"
manual: true
prepare: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite
#shellcheck source=tests/lib/pkgdb.sh
. "$TESTSLIB"/pkgdb.sh
distro_install_package snapd qemu genisoimage sshpass qemu-kvm cloud-image-utils ubuntu-image
prepare-each: |
"$TESTSLIB"/prepare-restore.sh --prepare-suite-each
restore: |
"$TESTSLIB"/prepare-restore.sh --restore-suite
tests/nested/core/:
summary: Tests for nested images
backends: [google-nested]
environment:
NESTED_ARCH: "$(HOST: echo ${SPREAD_NESTED_ARCH:-amd64})"
CORE_CHANNEL: "$(HOST: echo ${SPREAD_CORE_CHANNEL:-stable})"
CORE_REFRESH_CHANNEL: "$(HOST: echo ${SPREAD_CORE_REFRESH_CHANNEL:-edge})"
manual: true
prepare: |
#shellcheck source=tests/lib/pkgdb.sh
. "$TESTSLIB"/pkgdb.sh
distro_update_package_db
distro_install_package snapd qemu genisoimage sshpass qemu-kvm cloud-image-utils ubuntu-image
restore: |
#shellcheck source=tests/lib/pkgdb.sh
. "$TESTSLIB"/pkgdb.sh
distro_purge_package qemu genisoimage sshpass qemu-kvm cloud-image-utils ubuntu-image
# vim:ts=4:sw=4:et