[debian-edu-commits] debian-edu/ 01/01: Add simple autopkgtest to check if the metapackages are installable by building a chroot and install the metapackages there. Currently only test the Minimal profile.

Petter Reinholdtsen pere at moszumanska.debian.org
Sat Jul 19 08:11:19 UTC 2014


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository debian-edu.

commit 987c31e299973159ee9ccee7e0943b9400b1b3cc
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Sat Jul 19 10:10:23 2014 +0200

    Add simple autopkgtest to check if the metapackages are installable by building a chroot and install the metapackages there.  Currently only test the Minimal profile.
---
 debian/changelog           |  3 +++
 debian/control             |  1 +
 debian/tests/control       |  3 +++
 debian/tests/test-metapkgs | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 53 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c1936c7..9cca1d9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ debian-edu (1.718~0.git.2014-07-10) unstable; urgency=low
 
   * Update Standards-Version from 3.9.4 to 3.9.5.  No changes needed.
   * Fix typo in sources.list.experimental comment.
+  * Add simple autopkgtest to check if the metapackages are installable
+    by building a chroot and install the metapackages there.  Currently
+    only test the Minimal profile.
 
  -- Petter Reinholdtsen <pere at debian.org>  Thu, 10 Jul 2014 10:30:23 +0200
 
diff --git a/debian/control b/debian/control
index 6049a9c..e71e4df 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Uploaders: Petter Reinholdtsen <pere at debian.org>,
  Alexander Alemayhu <alexander at bitraf.no>,
 Build-Depends: debhelper (>= 6.0.7), blends-dev (>= 0.6.16.2)
 Standards-Version: 3.9.5
+XS-Testsuite: autopkgtest
 Vcs-Git: git://anonscm.debian.org/debian-edu/debian-edu.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-edu/debian-edu.git;a=summary
 Homepage: http://www.skolelinux.org
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..cd3288e
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: test-metapkgs
+Depends: debootstrap
+Restrictions: needs-root
diff --git a/debian/tests/test-metapkgs b/debian/tests/test-metapkgs
new file mode 100644
index 0000000..5895387
--- /dev/null
+++ b/debian/tests/test-metapkgs
@@ -0,0 +1,46 @@
+#!/bin/sh
+set -e
+
+chroot_test() {
+    cd $ADTTMP
+    target=test-chroot
+    suite=testing
+    debootstrap testing $target
+    printf "#!/bin/sh\nexit 101\n" > $target/usr/sbin/policy-rc.d
+    chmod a+rx $target/usr/sbin/policy-rc.d
+    mount -t proc proc $target/proc
+
+    # The bless script is not yet part of any binary package
+    apt-get source debian-edu-config 2>&1
+    cp debian-edu-config-*/share/debian-edu-config/tools/debian-edu-bless \
+	$target/root/.
+    PROFILE=$PROFILE DESKTOP=$DESKTOP chroot $target \
+	sh -x /root/debian-edu-bless
+
+    umount $target/proc
+    rm -rf $target
+}
+
+# Use predictable language setting.
+# FIXME should try several to check language specific setup
+LC_ALL=C
+export LC_ALL
+
+# First a simple test
+PROFILE=Minimal chroot_test
+
+# Skip the rest until we get the basic test working
+# FIXME Remove when the simple test is working.
+exit 0
+
+# Install profiles in chroots, first the non-desktop ones
+for profile in Minimal Main-Server; do
+    PROFILE="$profile" chroot_test
+done
+
+# Then the desktop ones
+for profile in Workstation Roaming-Workstation Thin-Client-Server Standalone; do
+    for desktop in kde gnome lxde xfce ; do
+        DESKTOP="$desktop" PROFILE="$profile" chroot_test
+    done
+done

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu.git



More information about the debian-edu-commits mailing list