Merge lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix-for-trusty into lp:~ubuntu-core-dev/livecd-rootfs/trusty-proposed

Proposed by Balint Reczey
Status: Merged
Merged at revision: 918
Proposed branch: lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix-for-trusty
Merge into: lp:~ubuntu-core-dev/livecd-rootfs/trusty-proposed
Diff against target: 127 lines (+109/-0)
3 files modified
debian/changelog (+11/-0)
debian/tests/control (+3/-0)
debian/tests/default-bootstraps (+95/-0)
To merge this branch: bzr merge lp:~rbalint/livecd-rootfs/livecd-rootfs-autopkgtest-fix-for-trusty
Reviewer Review Type Date Requested Status
Steve Langasek Pending
Review via email: mp+323965@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2016-07-25 20:31:30 +0000
+++ debian/changelog 2017-05-12 09:07:27 +0000
@@ -1,3 +1,14 @@
1livecd-rootfs (2.208.14) UNRELEASED; urgency=medium
2
3 [ Balint Reczey ]
4 * Add basic but configurable autopkgtest
5
6 [ Steve Langasek ]
7 * Mark autopkgtests isolation-machine since debootstrap won't work in a container.
8 (LP: #1684090)
9
10 -- Balint Reczey <balint.reczey@canonical.com> Thu, 11 May 2017 16:18:20 +0200
11
1livecd-rootfs (2.208.13) trusty; urgency=medium12livecd-rootfs (2.208.13) trusty; urgency=medium
213
3 * live-build/auto/config: Switch HWE from wily to xenial (LP: #1568918)14 * live-build/auto/config: Switch HWE from wily to xenial (LP: #1568918)
415
=== added directory 'debian/tests'
=== added file 'debian/tests/control'
--- debian/tests/control 1970-01-01 00:00:00 +0000
+++ debian/tests/control 2017-05-12 09:07:27 +0000
@@ -0,0 +1,3 @@
1Tests: default-bootstraps
2Depends: @, lsb-release
3Restrictions: needs-root isolation-machine
04
=== added file 'debian/tests/default-bootstraps'
--- debian/tests/default-bootstraps 1970-01-01 00:00:00 +0000
+++ debian/tests/default-bootstraps 2017-05-12 09:07:27 +0000
@@ -0,0 +1,95 @@
1#!/bin/sh
2# autopkgtest check: Build default rootfs for all supported project:subproject pairs
3# (C) 2017 Canonical Ltd.
4# Author: Balint Reczey <balint.reczey@canonical.com>
5
6set -e
7
8if [ -z "$SUITE"]; then
9 SUITE=$(lsb_release -c -s)
10fi
11
12# Known project:subproject:template combinations.
13# Listed subprojects can be combined with other projects as well,
14# but this list gives reasonable coverage.
15ALL_TRIPLETS="
16 base::
17 edubuntu::
18 edubuntu-dvd::
19 kubuntu::
20 kubuntu-active::
21 kubuntu-dvd::
22 kubuntu-plasma5::
23 lubuntu::
24 lubuntu-next::
25 mythbuntu::
26 ubuntu::
27 ubuntu-base::
28 ubuntu-budgie::
29 ubuntu-budgie-desktop::
30 ubuntu-budgie-live::
31 ubuntu-core:system-image:ubuntu-core
32 ubuntu-desktop-next:system-image:ubuntu-desktop-next
33 ubuntu-desktop-next::ubuntu-desktop-next
34 ubuntu-dvd::
35 ubuntu-gnome::
36 ubuntukylin::
37 ubuntu-mate::
38 ubuntu-mate-core::
39 ubuntu-mate-desktop::
40 ubuntu-mate-live::
41 ubuntu-netbook::
42 ubuntu-server::
43 ubuntu-server:ubuntu-rtm:
44 ubuntu-server:ubuntu-rtm/foo:
45 ubuntu-server:wubi:
46 ubuntu-touch-custom::ubuntu-touch-custom
47 ubuntu-touch::ubuntu-touch
48 xubuntu::"
49
50if [ -z "$SELECTED_TRIPLETS" ]; then
51 SELECTED_TRIPLETS="
52 ubuntu-base::
53"
54fi
55
56live_build_rootfs() {
57 PROJECT=${1%%:*}
58 local SUBPROJECT_TMP=${1%:*}
59 SUBPROJECT=${SUBPROJECT_TMP#*:}
60 TEMPLATE=${1##*:}
61 ARCH=$(dpkg --print-architecture)
62 echo "Building rootfs for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD"
63 cp -a /usr/share/livecd-rootfs/live-build/auto .
64 if [ -n "$TEMPLATE" ]; then
65 cp -a /usr/share/livecd-rootfs/live-build/$TEMPLATE .
66 fi
67 (env PROJECT=$PROJECT \
68 SUBPROJECT=$SUBPROJECT \
69 SUITE=$SUITE \
70 ARCH=$ARCH \
71 lb config
72 )
73 mkdir chroot
74 # this part needs root rights, but right now the whole script ran as root by autopkgtest
75 (env PROJECT=$PROJECT \
76 SUBPROJECT=$SUBPROJECT \
77 ARCH=$ARCH \
78 lb build
79 )
80 echo "Build results for project: '$PROJECT' subproject: '$SUBPROJECT' template: '$TEMPLATE' in $PWD"
81 du -sh *
82 echo ""
83}
84
85WORKDIR=$(mktemp -d)
86trap "RET=\$?; rm -rf $WORKDIR; exit \$RET" 0 INT QUIT ABRT PIPE TERM
87cd $WORKDIR
88
89for i in $SELECTED_TRIPLETS; do
90 mkdir $i
91 (cd $i && live_build_rootfs $i)
92 # clean up after build to avoid filling the disk, needs root rights
93 rm -rf $i
94done
95

Subscribers

People subscribed via source and target branches