launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #22522
[Merge] lp:~wgrant/launchpad/buildd-virtualenv into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/buildd-virtualenv into lp:launchpad.
Commit message:
Fix the test suite to run buildd-slave.tac in its virtualenv.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/buildd-virtualenv/+merge/345501
Broke when launchpad-developer-dependencies stopped pulling in python-twisted-core via python-lpbuildd.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/buildd-virtualenv into lp:launchpad.
=== modified file 'lib/lp/buildmaster/tests/mock_slaves.py'
--- lib/lp/buildmaster/tests/mock_slaves.py 2018-01-26 13:47:51 +0000
+++ lib/lp/buildmaster/tests/mock_slaves.py 2018-05-14 09:02:33 +0000
@@ -20,6 +20,7 @@
]
import os
+import sys
import types
import xmlrpclib
@@ -37,6 +38,7 @@
from lp.buildmaster.interactor import BuilderSlave
from lp.buildmaster.interfaces.builder import CannotFetchFile
from lp.services.config import config
+from lp.services.daemons.tachandler import twistd_script
from lp.services.webapp import urlappend
from lp.testing.sampledata import I386_ARCHITECTURE_NAME
@@ -274,19 +276,28 @@
return defer.Deferred()
+class LPBuilddSlaveTestSetup(BuilddSlaveTestSetup):
+ """A BuilddSlaveTestSetup that uses the LP virtualenv."""
+
+ def setUp(self):
+ super(LPBuilddSlaveTestSetup, self).setUp(
+ python_path=sys.executable,
+ twistd_script=twistd_script)
+
+
class SlaveTestHelpers(fixtures.Fixture):
@property
def base_url(self):
"""The URL for the XML-RPC service set up by `BuilddSlaveTestSetup`."""
- return 'http://localhost:%d' % BuilddSlaveTestSetup().daemon_port
+ return 'http://localhost:%d' % LPBuilddSlaveTestSetup().daemon_port
def getServerSlave(self):
"""Set up a test build slave server.
:return: A `BuilddSlaveTestSetup` object.
"""
- tachandler = self.useFixture(BuilddSlaveTestSetup())
+ tachandler = self.useFixture(LPBuilddSlaveTestSetup())
self.addDetail(
'xmlrpc-log-file',
Content(
Follow ups