Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Spreadify #49
Merged
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
49951c1
Add initial spread test
zyga 6ceaee5
Update spread tests to also work on debian-8
zyga 7f567e7
Add run-checks for spread and travis
zyga 81bce25
Add travis support
zyga adf05db
Tweak and fix run-checks
zyga 2ea2a79
Remove SPREAD_LINODE_KEY
zyga 260ad5c
Don't install debi (unused) for spread
zyga
Jump to file or symbol
Failed to load files and symbols.
| @@ -0,0 +1,3 @@ | ||
| +dist: trusty | ||
| +language: c | ||
| +script: ./run-checks |
12
run-checks
| @@ -0,0 +1,12 @@ | ||
| +#!/bin/sh | ||
| +export LANG=C.UTF-8 | ||
| +export LANGUAGE=en | ||
| +set -eu | ||
| + | ||
| +TMP_SPREAD="$(mktemp -d)" | ||
| +trap 'rm -rf "$TMP_SPREAD"' EXIT | ||
| + | ||
| +export PATH=$TMP_SPREAD:$PATH | ||
| +( cd "$TMP_SPREAD" && curl -s -O https://niemeyer.s3.amazonaws.com/spread-amd64.tar.gz && tar xzvf spread-amd64.tar.gz ) | ||
| + | ||
| +spread -v |
| @@ -0,0 +1,4 @@ | ||
| +summary: Check that ubuntu-core-launcher executes correctly | ||
| +execute: | | ||
| + echo "ubuntu-core-launcher is installed and responds to --help" | ||
| + ubuntu-core-launcher --help 2>&1 | grep -F -q 'Usage: ubuntu-core-launcher <security-tag> <binary>' |
48
spread.yaml
| @@ -0,0 +1,48 @@ | ||
| +project: snap-confine | ||
| + | ||
| +environment: | ||
| + REUSE_PROJECT: $(echo $REUSE_PROJECT) | ||
| + | ||
| +backends: | ||
| + linode: | ||
| + key: $(echo $SPREAD_LINODE_KEY) | ||
| + systems: | ||
| + - ubuntu-16.04-64-grub | ||
| + - debian-8 | ||
| + | ||
| +path: /remote/path/ | ||
| + | ||
| +exclude: | ||
| + - .git | ||
| + | ||
| +prepare: | | ||
| + echo "Spread is running as $(id)" | ||
| + [ "$REUSE_PROJECT" != 1 ] || exit 0 | ||
| + release_ID="$( . /etc/os-release && echo "${ID:-linux}" )" | ||
| + | ||
| + case $release_ID in | ||
| + ubuntu) | ||
| + # 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 | ||
| + ;; | ||
| + debian) | ||
| + ;; | ||
| + esac | ||
| + case $release_ID in | ||
| + ubuntu|debian) | ||
| + apt-get purge -y snap-confine || true | ||
| + apt-get update | ||
| + apt-get install --quiet -y fakeroot | ||
| + apt-get install --quiet -y autoconf automake autotools-dev debhelper dh-apparmor dh-autoreconf indent libapparmor-dev libseccomp-dev libudev-dev pkg-config shellcheck udev | ||
| + test -d /home/test || adduser --quiet --disabled-password --gecos '' test | ||
| + chown test.test -R .. | ||
| + sudo -i -u test /bin/sh -c "cd $PWD && DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -tc -b -Zgzip" | ||
| + dpkg -i ../snap-confine_*.deb || apt-get -f install -y | ||
| + dpkg -i ../ubuntu-core-launcher_*.deb || apt-get -f install -y | ||
| + rm -f ../snap-confine_*.deb ../ubuntu-core-launcher_*.deb | ||
| + ;; | ||
| + esac | ||
| +suites: | ||
| + spread-tests/: | ||
| + summary: Full-system tests for snap-confine |