Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Spreadify #49

Merged
merged 7 commits into from Jun 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
@@ -0,0 +1,3 @@
dist: trusty
language: c
script: ./run-checks
12 changes: 12 additions & 0 deletions 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
4 changes: 4 additions & 0 deletions spread-tests/basics/task.yaml
@@ -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 changes: 48 additions & 0 deletions 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