Package: freedombox-setup Version: 0.6 Severity: normal Tags: patch -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The attached patch proposes the following changes: Update Debian CI test case - - XS- prefix Testsuite: field in Source: section is no longer necessary. - - Running inside schroot is not enough for freedombox-setup. It may start services and may listen on network ports. For these cases it is recommended to use strong virtualization like Qemu. Added 'breaks-testbed' for this reason. - - Remove code for building a chroot environment. Depend on 'adt-run' to create a proper Qemu based virtual machine for freedombox-setup tests. - - There is usually a lot of output in stderr when setup is executed. autopkgtest will treat these a hard errors. Allow output on stderr using 'allow-stderr' restriction flag. - -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386, armhf Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWWwdlAAoJEDbDYUQMm8lxZYYP/08tDb4vGY7MvGRvpbrVLaSF 6fowb48fjwrbF+IolRYUlSYflrKBZN2965yg+LnC5GO/p9DzP6Oa/DNG/cJLrebQ Ca06U4aBVuVQJxLYcuR5iszz/kcIwSY8F98Lzy4zQKw5GnnRjQG70Mhg/BAFyoDK yOh/9CV3U48JklRK7/PhNm9TRVMtu88WPtLp9HSPTpRTcTcu9B3l88hxuSogZMn3 ZpVQGQon/qZvAMOaKu0rRt5uaWrMA7HqHoTI2N+igiSHrFuW0JeeoKAVxXVfZALu Z0oerAgosqqi7tp8eF8rVQPzxqWKWlOjJ9MeQ2APrOMDCLABCPdRI5nQskoUH4DQ 9pJwiuupvXQMUMagfP3gmmh03uuJGFuZIeFmjE0xEHnzvkgn6SazTBTMIH6AVD49 FoiARTN0VXfzQR1x8rBP4MuMOfhIlmX/dujVD+jVBXV28O/6RiyG/vc8ZCfjuO5j T8pODN+1h/w8t02v7tbTqYDmEnGouE+yhEz6F5KlIW0kg/reSC/oNaJwa9YFWn02 tikRikVyKVqTtpGojBua81xivOgiw32RM+kYbsR90u5eO+vSu9SBKkpx0489G6K6 WoEQBzq0Ckf8COBhdnv1YZOT8pRH1Z1ky/CZnK0R2pgjeOfiIb3IBU78SS8wksjn xkZpwKmTAAefFKrWBLKO =yQl3 -----END PGP SIGNATURE-----
>From 617b40d68cba39072033eb687bea5c10d642df90 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa <[email protected]> Date: Sun, 29 Nov 2015 16:22:54 +0530 Subject: [PATCH] Update Debian CI test case - XS- prefix Testsuite: field in Source: section is no longer necessary. - Running inside schroot is not enough for freedombox-setup. It may start services and may listen on network ports. For these cases it is recommended to use strong virtualization like Qemu. Added 'breaks-testbed' for this reason. - Remove code for building a chroot environment. Depend on 'adt-run' to create a proper Qemu based virtual machine for freedombox-setup tests. - There is usually a lot of output in stderr when setup is executed. autopkgtest will treat these a hard errors. Allow output on stderr using 'allow-stderr' restriction flag. --- debian/control | 2 +- debian/tests/control | 5 ++- debian/tests/test-chroot | 74 --------------------------------------------- debian/tests/test-run-setup | 5 +++ 4 files changed, 8 insertions(+), 78 deletions(-) delete mode 100755 debian/tests/test-chroot create mode 100755 debian/tests/test-run-setup diff --git a/debian/control b/debian/control index 1397b95..208d754 100644 --- a/debian/control +++ b/debian/control @@ -16,7 +16,7 @@ Build-Depends: debhelper (>= 9) , zip , libwww-perl Standards-Version: 3.9.6 -XS-Testsuite: autopkgtest +Testsuite: autopkgtest Homepage: https://wiki.debian.org/FreedomBox Vcs-Git: git://anonscm.debian.org/freedombox/freedombox-setup.git Vcs-Browser: http://anonscm.debian.org/cgit/freedombox/freedombox-setup.git diff --git a/debian/tests/control b/debian/tests/control index 0fa2752..0ba14fa 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,2 @@ -Tests: test-chroot -Depends: debootstrap -Restrictions: needs-root +Tests: test-run-setup +Restrictions: needs-root, breaks-testbed, allow-stderr diff --git a/debian/tests/test-chroot b/debian/tests/test-chroot deleted file mode 100755 index 57f7f48..0000000 --- a/debian/tests/test-chroot +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh - -set -e - -# Enable when debugging -#set -x - -at_exit() { - for m in $umount ; do - echo info: umounting "$m" - umount "$m" - done -} - -trap at_exit INT TERM EXIT - -chroot_test() { - cd $ADTTMP - - suite=unstable - target=test-chroot-$suite - - DEBIAN_FRONTEND=noninteractive - export DEBIAN_FRONTEND - - debootstrap --include freedombox-setup $suite $target - - printf "#!/bin/sh\nexit 101\n" > $target/usr/sbin/policy-rc.d - chmod a+rx $target/usr/sbin/policy-rc.d - - # Workaround for resolvconf not working in chroot without /run - # mounted. - rm $target/etc/resolv.conf - cp /etc/resolv.conf $target/etc/resolv.conf - - # Make sure chroot have some kind of hostname set in /etc/ - if [ -e /etc/hostname ] ; then - cp /etc/hostname $target/etc/hostname - else - echo localhost > $target/etc/hostname - fi - - mount -t proc proc $target/proc - umount="$target/proc" - mount -t sysfs sysfs $target/sys - umount="$target/proc $target/sys" - - # Workaround for something mounting /sys/fs/cgroup - umount="$target/sys/fs/cgroup $umount" - - chroot $target /usr/lib/freedombox/setup - - # List packages with problems in Debian - chroot $target how-can-i-help --old - - # Workaround for something mounting /sys/fs/cgroup - umount $target/sys/fs/cgroup - - umount $target/proc - umount="$target/sys" - umount $target/sys - umount="" - rm -rf $target -} - -# Use predictable language setting. -# FIXME should try several to check language specific setup -LC_ALL=C -export LC_ALL - -# Run test without downloading all the source -SOURCE=false chroot_test - -exit 0 diff --git a/debian/tests/test-run-setup b/debian/tests/test-run-setup new file mode 100755 index 0000000..93ce09a --- /dev/null +++ b/debian/tests/test-run-setup @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +/usr/lib/freedombox/setup -- 2.6.1

