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

Subscribers

People subscribed via source and target branches