Path: blob/devel/test/integration/targets/apt/tasks/apt-builddep.yml
4751 views
# test installing build-deps using netcat and quilt as test victims.1#2# Deps can be discovered like so (taken from ubuntu 12.04)3# ====4# root@localhost:~ # apt-rdepends --build-depends --follow=DEPENDS netcat5# Reading package lists... Done6# Building dependency tree7# Reading state information... Done8# netcat9# Build-Depends: debhelper (>= 8.0.0)10# Build-Depends: quilt11# root@localhost:~ #12# ====13# Since many things depend on debhelper, let's just uninstall quilt, then14# install build-dep for netcat to get it back. build-dep doesn't have an15# uninstall, so we don't need to test for reverse actions (eg, uninstall16# build-dep and ensure things are clean)1718# uninstall quilt19- name: check quilt with dpkg20shell: dpkg -s quilt21register: dpkg_result22ignore_errors: true23tags: ['test_apt_builddep']2425- name: uninstall quilt with apt26apt: pkg=quilt state=absent purge=yes27register: apt_result28when: dpkg_result is successful29tags: ['test_apt_builddep']3031# install build-dep for netcat32- name: install netcat build-dep with apt33apt: pkg=netcat state=build-dep34register: apt_result35tags: ['test_apt_builddep']3637- name: verify build_dep of netcat38assert:39that:40- "'changed' in apt_result"41tags: ['test_apt_builddep']4243# ensure debhelper and qilt are installed44- name: check build_deps with dpkg45shell: dpkg --get-selections | egrep '(debhelper|quilt)'46failed_when: False47register: dpkg_result48tags: ['test_apt_builddep']4950- name: verify build_deps are really there51assert:52that:53- "dpkg_result.rc == 0"54tags: ['test_apt_builddep']555657