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
|
summary: Ensure our debs are correctly built
details: |
When snapd is tested in Ubuntu and Debian, .deb files are created using
the snapd code from the local branch.
This test verifies that the debs have the 'built-using' header. It also
checks that Apparmor & Seccomp are compiled (only in Ubuntu), that
the snapd.session-agent.socket symlink is part of the deb and that
it has the right (relative) target.
systems: [-ubuntu-core-*, -fedora-*, -opensuse-*, -arch-*, -amazon-*, -centos-*]
execute: |
echo "Ensure that our debs have the 'built-using' header"
out=$(dpkg -I "$GOHOME"/snapd_*.deb)
if os.query is-ubuntu; then
# Apparmor & seccomp is only compiled in on Ubuntu for now.
echo "$out" | MATCH 'Built-Using:.*apparmor \(='
echo "$out" | MATCH 'Built-Using:.*libseccomp \(='
fi
echo "$out" | MATCH 'Built-Using:.*libcap2 \(='
# not running on 14.04 because we don't have user sessions there
if not os.query is-trusty; then
echo "Ensure that the snapd.session-agent.socket symlinks is part of the deb and that it has the right (relative) target"
dpkg -c "$GOHOME"/snapd_*.deb |MATCH -- '-> \.\./snapd.session-agent.socket'
fi
|