[debian-edu-commits] debian-edu/ 01/03: Rearrange autopkgtests such that the don't time out anymore

Holger Levsen holger at layer-acht.org
Thu Mar 15 20:37:45 UTC 2018


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

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

commit 64712f4dab068506cc37cfcb6f590d45809ac315
Author: Paul Gevers <elbrus at debian.org>
Date:   Thu Mar 15 13:26:10 2018 +0100

    Rearrange autopkgtests such that the don't time out anymore
    
    - run PROFILE/DESKTOP combinations separately
    - get rid of debootstrap (as it isn't needed anymore)
    - greatly simplify test code
---
 debian/tests/control       | 12 ++++++++--
 debian/tests/test-metapkgs | 59 +++-------------------------------------------
 2 files changed, 13 insertions(+), 58 deletions(-)

diff --git a/debian/tests/control b/debian/tests/control
index e76e2a1..d1611a5 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,11 @@
-Tests:  test-tasksel-desktop test-metapkgs
-Depends: debootstrap, debian-edu-install, education-common, education-tasks
+Tests: test-tasksel-desktop
+Depends: education-common
+Restrictions: needs-root allow-stderr
+
+Test-Command: PROFILE=Minimal debian/tests/test-metapkgs
+Depends: education-common, how-can-i-help
+Restrictions: needs-root allow-stderr
+
+Test-Command: PROFILE=Workstation DESKTOP=kde debian/tests/test-metapkgs
+Depends: education-common, how-can-i-help
 Restrictions: needs-root allow-stderr
diff --git a/debian/tests/test-metapkgs b/debian/tests/test-metapkgs
old mode 100644
new mode 100755
index 6a37460..6e4d465
--- a/debian/tests/test-metapkgs
+++ b/debian/tests/test-metapkgs
@@ -1,60 +1,17 @@
 #!/bin/sh
 set -e
 
-at_exit() {
-    echo "info: terminating script"
-    for m in $umount ; do
-	echo info: umounting "$m"
-	umount "$m"
-    done
-}
-
-trap at_exit INT TERM EXIT
-
-# Make sure temp directory setting do not leak into chroot.
-chroot_run() {
-    target=$1
-    shift
-    TMP= TMPDIR= TEMP= TEMPDIR= chroot $target "$@"
-}
-
 chroot_test() {
     echo
     echo "Installing Debian Edu chroot with profile $PROFILE and desktop $DESKTOP"
     echo
     cd $ADTTMP
-    target=test-chroot
-    suite=testing
-    edusuite=buster
-    debootstrap $suite $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
-    umount="$target/proc"
-    mount -t sysfs sysfs $target/sys
-    umount="$target/proc $target/sys"
 
-    # The bless script is recently part of the debian-edu-config package.
-    if [ -x /usr/share/debian-edu-config/tools/debian-edu-bless ] ; then
-	cp /usr/share/debian-edu-config/tools/debian-edu-bless \
-	    $target/root/.
-    else
-	apt-get source debian-edu-config 2>&1
-	cp debian-edu-config-*/share/debian-edu-config/tools/debian-edu-bless \
-	    $target/root/.
-    fi
     PROFILE=$PROFILE DESKTOP=$DESKTOP EDUSUITE=$edusuite \
-	chroot_run $target sh -x /root/debian-edu-bless 2>&1
+        sh -x /usr/share/debian-edu-config/tools/debian-edu-bless 2>&1
 
     # List packages with problems in Debian
-    chroot_run $target apt-get install -y how-can-i-help
-    chroot_run $target how-can-i-help --old
-
-    umount $target/proc
-    umount="$target/sys"
-    umount $target/sys
-    umount=""
-    rm -rf $target
+    how-can-i-help --old
 }
 
 # Use predictable language setting.
@@ -73,14 +30,4 @@ echo "info: File system status (/proc/mounts):"
 cat /proc/mounts
 echo
 
-# 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 LTSP-Server Standalone; do
-    for desktop in kde gnome lxde xfce mate ; do
-        DESKTOP="$desktop" PROFILE="$profile" chroot_test
-    done
-done
+chroot_test

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