[debian-edu-commits] debian-edu/ 02/03: Add new check test-tasksel-desktop verifying that the correct desktop metapackage is selected by tasksel. It would have discovered bug #762365 a bit earlier.

Petter Reinholdtsen pere at moszumanska.debian.org
Thu Sep 25 18:10:35 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 1e8cf6a694ce81b2c676ca8c0ebdc3947b8af55c
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Thu Sep 25 20:08:32 2014 +0200

    Add new check test-tasksel-desktop verifying that the
    correct desktop metapackage is selected by tasksel.
    It would have discovered bug #762365 a bit earlier.
---
 debian/changelog                  |  3 +++
 debian/tests/control              |  4 ++--
 debian/tests/test-tasksel-desktop | 41 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d3e00d6..519d24a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,9 @@ debian-edu (1.801~0.git.2014-09-24) unstable; urgency=low
     edu-preferred-desktop tasksel test, as the new default-desktop
     test is not working the way we need.  Without this fix, no desktop
     style is selected.
+  * Add new check test-tasksel-desktop verifying that the correct
+    desktop metapackage is selected by tasksel.  It would have
+    discovered bug #762365 a bit earlier.
 
   [ Wolfgang Schweer ]
   * Drop non-existent packages celestia-kde and cl-geodesics from the
diff --git a/debian/tests/control b/debian/tests/control
index f97925c..e76e2a1 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,3 @@
-Tests: test-metapkgs
-Depends: debootstrap, debian-edu-install, education-common
+Tests:  test-tasksel-desktop test-metapkgs
+Depends: debootstrap, debian-edu-install, education-common, education-tasks
 Restrictions: needs-root allow-stderr
diff --git a/debian/tests/test-tasksel-desktop b/debian/tests/test-tasksel-desktop
new file mode 100644
index 0000000..ab4bac0
--- /dev/null
+++ b/debian/tests/test-tasksel-desktop
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# Check that tasksel pick the correct desktop environment.
+
+DEBIAN_FRONTEND=noninteractive
+export DEBIAN_FRONTEND
+
+error=0
+
+success() { echo success: "$@"; }
+error() { error=1; echo error: "$@"; }
+
+echo debian-edu-install debian-edu-install/profile multiselect Workstation \
+    | debconf-set-selections
+
+for desktop in kde gnome lxde xfce mate ; do
+    echo tasksel tasksel/desktop multiselect "$desktop" \
+	| debconf-set-selections
+    wanted="education-desktop-$desktop"
+
+    # Find the selected metapackages.
+    selected=$(/usr/lib/education-tasks/edu-tasksel-setup tasksel \
+	--new-install --test 2>&1 \
+	| tr " " "\n" \
+	| sort \
+	| grep education-desktop \
+	| grep -v education-desktop-other)
+
+    if [ "$(echo $selected |wc -w)" -eq 1 ] ; then
+	success "Only one desktop style selected for tasksel/desktop=$desktop"
+    else
+	error "Not only one desktop style selected for tasksel/desktop=$desktop: " $selected
+    fi
+    if echo $selected | grep -wq education-desktop-$desktop ; then
+	success "tasksel selected $wanted for installation with tasksel/desktop=$desktop." 1>&2
+    else
+	error "tasksel did not select $wanted for installation with tasksel/desktop=$desktop." 1>&2
+    fi
+done
+
+exit $error

-- 
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