launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05624
[Merge] lp:~mbp/launchpad-buildd/lpbuildd-tests into lp:launchpad-buildd
Martin Pool has proposed merging lp:~mbp/launchpad-buildd/lpbuildd-tests into lp:launchpad-buildd.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~mbp/launchpad-buildd/lpbuildd-tests/+merge/82837
Support 'make check' in launchpad-buildd.
launchpad's TestCase apparently now depends on having amqp running to capture oopses so I've updated the tests to avoid it.
There are still quite a few library dependencies so for now I'll just assume you run this from buildout.
--
https://code.launchpad.net/~mbp/launchpad-buildd/lpbuildd-tests/+merge/82837
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~mbp/launchpad-buildd/lpbuildd-tests into lp:launchpad-buildd.
=== modified file 'Makefile'
--- Makefile 2011-11-11 05:20:10 +0000
+++ Makefile 2011-11-21 01:59:23 +0000
@@ -19,3 +19,15 @@
rm -f ../launchpad-buildd*changes
.PHONY: all clean deb
+
+PYTHON=python
+# NB: for this to pass, you must have txfixtures, lazr.restful, and lp on your pythonpath
+# already. lp is not packaged so this is not enforced as a build time
+# dependency. In practice you probably just want to run this with PYTHON=bin/py from
+# a Launchpad checkout.
+check:
+ PYTHONPATH=$(PWD):$(PYTHONPATH) $(PYTHON) -m testtools.run -v \
+ lpbuildd.tests.test_buildd_slave \
+ lpbuildd.tests.test_check_implicit_pointer_functions \
+ lpbuildd.tests.test_harness \
+ lpbuildd.tests.test_translationtemplatesbuildmanager
=== modified file 'debian/changelog'
--- debian/changelog 2011-11-18 08:32:22 +0000
+++ debian/changelog 2011-11-21 01:59:23 +0000
@@ -1,3 +1,16 @@
+launchpad-buildd (106) hardy; urgency=low
+
+ * Safer parsing in upgrade-config.
+
+ -- Martin Pool <mbp@xxxxxxxxxxxxx> Mon, 21 Nov 2011 12:19:52 +1100
+
+launchpad-buildd (105.1) hardy; urgency=low
+
+ * Add strict version dependency of launchpad-buildd on python-lpbuildd.
+ * Add explicit Python dependency for lintian.
+
+ -- Martin Pool <mbp@xxxxxxxxxxxxx> Mon, 21 Nov 2011 12:16:34 +1100
+
launchpad-buildd (105) hardy; urgency=low
* Remove attempt to run dpkg-query from inside the slave: each state machine
=== modified file 'debian/control'
--- debian/control 2011-11-16 18:19:07 +0000
+++ debian/control 2011-11-21 01:59:23 +0000
@@ -8,7 +8,9 @@
Package: launchpad-buildd
Section: misc
Architecture: all
-Depends: python-lpbuildd, debootstrap, dpkg-dev, linux32, file, bzip2, sudo, ntpdate, adduser, apt-transport-https, lsb-release, apache2, pristine-tar,
+Depends: python-lpbuildd (=${source:Version}),
+ python,
+ debootstrap, dpkg-dev, linux32, file, bzip2, sudo, ntpdate, adduser, apt-transport-https, lsb-release, apache2, pristine-tar,
python-apt, ${misc:Depends}
Conflicts: sbuild
Description: Launchpad buildd slave
@@ -21,7 +23,7 @@
Package: python-lpbuildd
Section: python
Architecture: all
-Depends: python-twisted-core, python-twisted-web, ${misc:Depends}
+Depends: python, python-twisted-core, python-twisted-web, ${misc:Depends}
Conflicts: launchpad-buildd (<< 88)
Description: Python libraries for a Launchpad buildd slave
This contains the Python libraries that control the Launchpad buildd slave.
=== modified file 'debian/upgrade-config'
--- debian/upgrade-config 2011-11-09 07:50:56 +0000
+++ debian/upgrade-config 2011-11-21 01:59:23 +0000
@@ -1,10 +1,11 @@
#!/usr/bin/python
#
-# Copyright 2009, 2010 Canonical Ltd. This software is licensed under the
+# Copyright 2009, 2010, 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Upgrade a launchpad-buildd configuration file."""
+import re
import sys
import os
import subprocess
@@ -103,8 +104,7 @@
if __name__ == "__main__":
- if old_version.find("~") > 0:
- old_version = old_version[:old_version.find("~")]
+ old_version = re.sub(r'[~-].*', '', old_version)
if int(old_version) < 12:
upgrade_to_12()
if int(old_version) < 34:
=== modified file 'lpbuildd/tests/test_check_implicit_pointer_functions.py'
--- lpbuildd/tests/test_check_implicit_pointer_functions.py 2011-11-10 04:55:02 +0000
+++ lpbuildd/tests/test_check_implicit_pointer_functions.py 2011-11-21 01:59:23 +0000
@@ -1,7 +1,7 @@
# Copyright 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
-from lp.testing import TestCase
+from testtools import TestCase
from lpbuildd.check_implicit_pointer_functions import implicit_pattern
from lpbuildd.check_implicit_pointer_functions import pointer_pattern
=== modified file 'lpbuildd/tests/test_translationtemplatesbuildmanager.py'
--- lpbuildd/tests/test_translationtemplatesbuildmanager.py 2011-11-10 04:55:02 +0000
+++ lpbuildd/tests/test_translationtemplatesbuildmanager.py 2011-11-21 01:59:23 +0000
@@ -1,11 +1,13 @@
-# Copyright 2010 Canonical Ltd. This software is licensed under the
+# Copyright 2010, 2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
__metaclass__ = type
import os
+import shutil
+import tempfile
-from lp.testing import TestCase
+from testtools import TestCase
from lp.testing.fakemethod import FakeMethod
from lpbuildd.translationtemplates import (
@@ -61,7 +63,8 @@
"""Run TranslationTemplatesBuildManager through its iteration steps."""
def setUp(self):
super(TestTranslationTemplatesBuildManagerIteration, self).setUp()
- self.working_dir = self.makeTemporaryDirectory()
+ self.working_dir = tempfile.mkdtemp()
+ self.addCleanup(lambda: shutil.rmtree(self.working_dir))
slave_dir = os.path.join(self.working_dir, 'slave')
home_dir = os.path.join(self.working_dir, 'home')
for dir in (slave_dir, home_dir):
Follow ups