[Build-common-hackers] Bug#525855: cdbs: do not hardcode python versions in test suite
Martin Pitt
martin.pitt at ubuntu.com
Mon Apr 27 14:38:25 UTC 2009
Package: cdbs
Version: 0.4.56
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch karmic
Hello,
cdbs currently hardcodes python versions in its test suite. In Ubuntu
we support 2.5 and 2.6, and with 2.6 already being in sid
experimental, this will be the case in Sid soon as well.
This patch replaces the 2.4/2.5 hardcoding with a more robust solution
which b-deps on python-all-dev and uses a loop over pyversions in the
test suite.
Thanks for considering,
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
-------------- next part --------------
=== modified file 'debian/changelog'
--- debian/changelog 2009-04-27 14:25:14 +0000
+++ debian/changelog 2009-04-27 14:34:32 +0000
@@ -49,6 +49,12 @@
- test/testsuite_functions: Set NO_PKG_MANGLE so that tests do not fail
with pkgstriptranslations installed.
* Drop xfce.mk, not used any more. (LP: #254048)
+ * Stop hardcoding Python versions, to not break the tests if a new version
+ is added or one dropped:
+ - debian/control: Drop hardcoded python2.x-dev build dependencies,
+ replaced by python-all-dev.
+ - test/distutils-[347].sh: Use a loop over pyversions -vs instead of
+ hardcoding versions in python module destination paths.
-- Martin Pitt <martin.pitt at ubuntu.com> Mon, 27 Apr 2009 14:55:47 +0200
=== modified file 'debian/control'
--- debian/control 2009-04-27 14:03:41 +0000
+++ debian/control 2009-04-27 14:25:42 +0000
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss at lists.ubuntu.com>
XSBC-Original-Maintainer: CDBS Hackers <build-common-hackers at lists.alioth.debian.org>
-Build-Depends-Indep: debhelper (>= 5), graphviz, realpath, fakeroot, python-dev, python2.4-dev, python2.5-dev, python-central, python-support, libxml2-utils, xsltproc, docbook-xml, docbook-xsl, dblatex, ant, sharutils, gs-common, texlive-extra-utils
+Build-Depends-Indep: debhelper (>= 5), graphviz, realpath, fakeroot, python-dev, python-all-dev, python-central, python-support, libxml2-utils, xsltproc, docbook-xml, docbook-xsl, dblatex, ant, sharutils, gs-common, texlive-extra-utils
Uploaders: Jonas Smedegaard <dr at jones.dk>, Marc Dequ?nes (Duck) <Duck at DuckCorp.org>, Peter Eisentraut <petere at debian.org>
Standards-Version: 3.7.3
Vcs-Bzr: https://code.launchpad.net/~ubuntu-core-dev/cdbs/ubuntu
=== modified file 'test/distutils-3.sh'
--- test/distutils-3.sh 2009-04-27 14:25:14 +0000
+++ test/distutils-3.sh 2009-04-27 14:28:11 +0000
@@ -51,8 +51,9 @@
build_package
-dpkg -c $WORKDIR/../python-cdbs-testsuite_0.1_*.deb | grep -F -q /usr/lib/python2.5/site-packages/testing/foo.py || return_fail
-dpkg -c $WORKDIR/../python-cdbs-testsuite_0.1_*.deb | grep -F -q /usr/lib/python2.4/site-packages/testing/foo.py || return_fail
+for v in `pyversions -vs`; do
+ dpkg -c $WORKDIR/../python-cdbs-testsuite_0.1_*.deb | grep -F -q /usr/lib/python$v/site-packages/testing/foo.py || return_fail
+done
clean_package
test -d $WORKDIR/build && return_fail
=== modified file 'test/distutils-4.sh'
--- test/distutils-4.sh 2009-03-28 10:46:11 +0000
+++ test/distutils-4.sh 2009-04-27 14:29:13 +0000
@@ -53,8 +53,9 @@
build_package
-dpkg -c $WORKDIR/../python-cdbs-testsuite_0.1_*.deb | grep -F -q /usr/lib/python2.5/site-packages/testing/foo.py || return_fail
-dpkg -c $WORKDIR/../python-cdbs-testsuite_0.1_*.deb | grep -F -q /usr/lib/python2.4/site-packages/testing/foo.py || return_fail
+for v in `pyversions -vs`; do
+ dpkg -c $WORKDIR/../python-cdbs-testsuite_0.1_*.deb | grep -F -q /usr/lib/python$v/site-packages/testing/foo.py || return_fail
+done
clean_workdir
return_pass
=== modified file 'test/distutils-7.sh'
--- test/distutils-7.sh 2009-04-08 20:21:15 +0000
+++ test/distutils-7.sh 2009-04-27 14:31:19 +0000
@@ -52,8 +52,9 @@
build_package
dpkg -c $WORKDIR/../python-cdbs-testsuite_0.1_*.deb | grep -q '/usr/share/py\(thon-support/python-cdbs-testsuite\|shared\)/testing/foo.py' || return_fail
-dpkg -c $WORKDIR/../python-cdbs-testsuite_0.1_*.deb | grep -q '/usr/lib/py\(thon-support/python-cdbs-testsuite\|shared\)/python2.4/foo.so' || return_fail
-dpkg -c $WORKDIR/../python-cdbs-testsuite_0.1_*.deb | grep -q '/usr/lib/py\(thon-support/python-cdbs-testsuite\|shared\)/python2.5/foo.so' || return_fail
+for v in `pyversions -vs`; do
+ dpkg -c $WORKDIR/../python-cdbs-testsuite_0.1_*.deb | grep -q "/usr/lib/py\(thon-support/python-cdbs-testsuite\|shared\)/python$v/foo.so" || return_fail
+done
clean_package
test -d $WORKDIR/build && return_fail
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/build-common-hackers/attachments/20090427/0320fc4a/attachment.pgp>
More information about the Build-common-hackers
mailing list