launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24680
[Merge] ~cjwatson/launchpad-buildd:py3-skip-xenial-twisted into launchpad-buildd:master
Colin Watson has proposed merging ~cjwatson/launchpad-buildd:py3-skip-xenial-twisted into launchpad-buildd:master.
Commit message:
Skip tests involving daemonisation on Python 3 and Twisted < 16.4.0
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/383471
Until Twisted 16.4.0, twistd hung indefinitely when run on Python 3. Ubuntu 16.04 has Twisted 16.0.0, and backporting a newer version turns out to have considerable complications; furthermore, we're going to need to run at least some instances of launchpad-buildd on 16.04 for some time, because we still need to run powerpc builders and the powerpc architecture was removed in the 17.04 cycle.
Once launchpad-buildd supports both Python 2 and 3, the plan is to run it on Python 3 when built for bionic and above, and otherwise run it on Python 2. To facilitate this, skip the one test that fails on Python 3 if we don't have a new enough Twisted.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad-buildd:py3-skip-xenial-twisted into launchpad-buildd:master.
diff --git a/debian/changelog b/debian/changelog
index 1995088..582e50f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ launchpad-buildd (190) UNRELEASED; urgency=medium
* Treat build logs as binary files.
* Treat build output files as binary files.
* Treat intltool-related files as binary files.
+ * Skip tests involving daemonisation on Python 3 and Twisted < 16.4.0.
-- Colin Watson <cjwatson@xxxxxxxxxx> Tue, 28 Apr 2020 10:19:27 +0100
diff --git a/lpbuildd/tests/test_buildd_slave.py b/lpbuildd/tests/test_buildd_slave.py
index 6c70529..f59b1b7 100644
--- a/lpbuildd/tests/test_buildd_slave.py
+++ b/lpbuildd/tests/test_buildd_slave.py
@@ -18,11 +18,13 @@ __all__ = ['LaunchpadBuilddSlaveTests']
import difflib
import os
import shutil
+import sys
import tempfile
import unittest
from six.moves.urllib.request import HTTPBasicAuthHandler
from six.moves.xmlrpc_client import ServerProxy
+import twisted
from lpbuildd.tests.harness import (
BuilddSlaveTestSetup,
@@ -213,6 +215,10 @@ class XMLRPCBuildDSlaveTests(unittest.TestCase):
self.slave.tearDown()
super(XMLRPCBuildDSlaveTests, self).tearDown()
+ @unittest.skipIf(
+ sys.version >= '3' and
+ (twisted.version.major, twisted.version.minor) < (16, 4),
+ 'twistd fails to daemonise on Python 3 before Twisted 16.4.0')
def test_build_unknown_builder(self):
# If a bogus builder name is passed into build, it returns an
# appropriate error message and not just 'None'.