github.com/bugraaydogar/snapd@v0.0.0-20210315170335-8c70bb858939/packaging/debian-sid/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 are not get killed too easily 21 printf '%s\n' "-950" > /proc/$$/oom_score_adj 22 23 # see what mem we have (for debugging) 24 cat /proc/meminfo 25 26 # ensure we can do a connect to localhost 27 echo ubuntu:ubuntu|chpasswd 28 sed -i 's/\(PermitRootLogin\|PasswordAuthentication\)\>.*/\1 yes/' /etc/ssh/sshd_config 29 systemctl reload sshd.service 30 31 # Map snapd deb package pockets to core snap channels. This is intended to cope 32 # with the autopkgtest execution when testing packages from the different pockets 33 if apt -qq list snapd | grep -q -- -proposed; then 34 export SPREAD_CORE_CHANNEL=candidate 35 elif apt -qq list snapd | grep -q -- -updates; then 36 export SPREAD_CORE_CHANNEL=stable 37 fi 38 39 # Spread will only buid with recent go 40 snap install --classic go 41 42 # and now run spread against localhost 43 # shellcheck disable=SC1091 44 . /etc/os-release 45 export GOPATH=/tmp/go 46 /snap/bin/go get -u github.com/snapcore/spread/cmd/spread 47 /tmp/go/bin/spread -v "autopkgtest:${ID}-${VERSION_ID}-$(dpkg --print-architecture)":tests/smoke/ 48 49 # store journal info for inspectsion 50 journalctl --sync 51 journalctl -ab > "$ADT_ARTIFACTS"/journal.txt