-
Notifications
You must be signed in to change notification settings - Fork 601
/
Copy pathspread.yaml
129 lines (112 loc) · 3.82 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
project: snapd
environment:
GOPATH: /home/gopath
REUSE_PROJECT: "$(HOST: echo $REUSE_PROJECT)"
PROJECT_PATH: $GOPATH/src/github.com/snapcore/snapd
PATH: $GOPATH/bin:/snap/bin:$PATH
TESTSLIB: $PROJECT_PATH/tests/lib
SNAP_REEXEC: 0
SPREAD_STORE_USER: "$(HOST: echo $SPREAD_STORE_USER)"
SPREAD_STORE_PASSWORD: "$(HOST: echo $SPREAD_STORE_PASSWORD)"
LANG: "$(echo $LANG)"
backends:
linode:
key: "$(HOST: echo $SPREAD_LINODE_KEY)"
halt-timeout: 2h
systems:
- ubuntu-16.04-64:
kernel: GRUB 2
- ubuntu-16.04-32:
kernel: GRUB 2
- ubuntu-core-16-64:
kernel: Direct Disk
image: ubuntu-16.04-64
qemu:
systems:
- ubuntu-16.04-64:
username: ubuntu
password: ubuntu
- ubuntu-core-16-64:
image: ubuntu-16.04-64
username: ubuntu
password: ubuntu
adhoc:
allocate: |
echo "Allocating ad-hoc $SPREAD_SYSTEM"
if [ -z "$ADT_ARTIFACTS" ]; then
echo "out adhoc only works inside autopkgtest"
exit 1
fi
echo "localhost:22"
discard: |
echo "Discarding ad-hoc $SPREAD_SYSTEM"
systems:
- ubuntu-16.04-64:
username: ubuntu
password: ubuntu
path: /home/gopath/src/github.com/snapcore/snapd
exclude:
- .git
prepare: |
# this indicates that the server got reused, nothing to setup
[ "$REUSE_PROJECT" != 1 ] || exit 0
# apt update is hanging on security.ubuntu.com with IPv6.
sysctl -w net.ipv6.conf.all.disable_ipv6=1
trap "sysctl -w net.ipv6.conf.all.disable_ipv6=0" EXIT
apt purge -y snapd || true
apt update
# utilities
apt install -y devscripts expect jq rng-tools software-properties-common
# needed so that we have golang-gopkg-macaroon.v1 which is not (yet)
# in trusty
add-apt-repository --update ppa:snappy-dev/image
# this should not be needed but apparently it is :/
apt update
apt build-dep -y ./
# FIXME: this can be removed once snap-confine 1.0.38-0ubuntu0.16.04.8
# hits xenial-updates
apt install -y snap-confine
# and remove the image PPA again
add-apt-repository --remove ppa:snappy-dev/image
# increment version so upgrade can work
dch -i "testing build"
test -d /home/test || adduser --quiet --disabled-password --gecos '' test
echo 'test ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
chown test.test -R ..
su -l -c "cd $PWD && DEB_BUILD_OPTIONS='nocheck testkeys' dpkg-buildpackage -tc -b -Zgzip" test
# Disable burst limit so resetting the state quickly doesn't create problems.
mkdir -p /etc/systemd/system/snapd.service.d
cat <<EOF > /etc/systemd/system/snapd.service.d/local.conf
[Unit]
StartLimitInterval=0
[Service]
Environment=SNAPD_DEBUG_HTTP=7 SNAP_REEXEC=0
EOF
# Build snapbuild.
apt install -y git
go get ./tests/lib/snapbuild
# Build fakestore.
go get ./tests/lib/fakestore/cmd/fakestore
suites:
tests/main/:
summary: Full-system tests for snapd
prepare: |
. $TESTSLIB/prepare.sh
if [ "$SPREAD_SYSTEM" = "ubuntu-core-16-64" ]; then
prepare_all_snap
else
prepare_classic
fi
restore: |
$TESTSLIB/reset.sh
if [ "$SPREAD_SYSTEM" != "ubuntu-core-16-64" ]; then
apt purge -y snapd || true
fi
restore-each: |
$TESTSLIB/reset.sh --reuse-core
tests/upgrade/:
summary: Tests for snapd upgrade
restore:
apt purge -y snapd || true
restore-each: |
$TESTSLIB/reset.sh