github.com/chipaca/snappy@v0.0.0-20210104084008-1f06296fe8ad/packaging/ubuntu-14.04/tests/integrationtests (about) 1 #!/bin/sh 2 3 set -ex 4 5 # required for the debian adt host 6 mkdir -p /etc/systemd/system/snapd.service.d/ 7 if [ "${http_proxy:-}" != "" ]; then 8 cat <<EOF | tee /etc/systemd/system/snapd.service.d/proxy.conf 9 [Service] 10 Environment=http_proxy=$http_proxy 11 Environment=https_proxy=$http_proxy 12 EOF 13 14 # ensure environment is updated 15 echo "http_proxy=$http_proxy" >> /etc/environment 16 echo "https_proxy=$http_proxy" >> /etc/environment 17 fi 18 systemctl daemon-reload 19 20 # ensure we can do a connect to localhost 21 echo ubuntu:ubuntu|chpasswd 22 sed -i 's/\(PermitRootLogin\|PasswordAuthentication\)\>.*/\1 yes/' /etc/ssh/sshd_config 23 24 service ssh restart 25 26 # Map snapd deb package pockets to core snap channels. This is intended to cope 27 # with the autopkgtest execution when testing packages from the different pockets 28 if apt -qq list snapd | grep -q -- -proposed; then 29 export SPREAD_CORE_CHANNEL=candidate 30 elif apt -qq list snapd | grep -q -- -updates; then 31 export SPREAD_CORE_CHANNEL=stable 32 fi 33 34 # and now run spread against localhost 35 # shellcheck disable=SC1091 36 . /etc/os-release 37 apt-get install golang-1.6-go 38 export GOPATH=/tmp/go 39 export PATH=/usr/lib/go-1.6/bin:${PATH} 40 go get -u github.com/snapcore/spread/cmd/spread 41 /tmp/go/bin/spread -v "autopkgtest:${ID}-${VERSION_ID}-$(dpkg --print-architecture)"