Merge lp:~mwhudson/launchpad/more-direct-delivery-pls into lp:launchpad

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~mwhudson/launchpad/more-direct-delivery-pls
Merge into: lp:launchpad
Diff against target: 76 lines (+24/-7)
4 files modified
Makefile (+4/-1)
lib/canonical/launchpad/scripts/__init__.py (+8/-6)
lib/devscripts/ec2test/testrunner.py (+4/-0)
script-testing.zcml (+8/-0)
To merge this branch: bzr merge lp:~mwhudson/launchpad/more-direct-delivery-pls
Reviewer Review Type Date Requested Status
Francis J. Lacoste (community) Approve
Review via email: mp+21685@code.launchpad.net

Commit message

Force all zopeless mail delivery to be direct, have /var/tmp/launchpad_mailqueue be read-only in ec2 tests and reenable sampledata-setup.txt

Description of the change

Hi, as trailed on IRC this branch forces all delivery in zopeless mode to be direct.

Cheers,
mwh

To post a comment you must log in.
Revision history for this message
Francis J. Lacoste (flacoste) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2010-03-15 17:46:45 +0000
3+++ Makefile 2010-03-18 22:30:44 +0000
4@@ -337,7 +337,6 @@
5 /var/tmp/codehosting.test \
6 /var/tmp/codeimport \
7 /var/tmp/fatsam.appserver \
8- /var/tmp/launchpad_mailqueue \
9 /var/tmp/lperr \
10 /var/tmp/lperr.test \
11 /var/tmp/mailman \
12@@ -345,6 +344,10 @@
13 /var/tmp/ppa \
14 /var/tmp/ppa.test \
15 /var/tmp/zeca
16+ # /var/tmp/launchpad_mailqueue is created read-only on ec2test
17+ # instances.
18+ if [ -w /var/tmp/launchpad_mailqueue ]; then $(RM) -rf /var/tmp/launchpad_mailqueue; fi
19+
20
21 realclean: clean
22 $(RM) TAGS tags
23
24=== modified file 'lib/canonical/launchpad/scripts/__init__.py'
25--- lib/canonical/launchpad/scripts/__init__.py 2009-10-20 22:13:21 +0000
26+++ lib/canonical/launchpad/scripts/__init__.py 2010-03-18 22:30:44 +0000
27@@ -105,12 +105,14 @@
28 Instead, your test should use the Zopeless layer.
29 """
30
31- scriptzcmlfilename = os.path.normpath(
32- os.path.join(os.path.dirname(__file__),
33- os.pardir, os.pardir, os.pardir, os.pardir,
34- 'script.zcml'))
35-
36- scriptzcmlfilename = os.path.abspath(scriptzcmlfilename)
37+ if config.instance_name == 'testrunner':
38+ scriptzcmlfilename = 'script-testing.zcml'
39+ else:
40+ scriptzcmlfilename = 'script.zcml'
41+
42+ scriptzcmlfilename = os.path.abspath(
43+ os.path.join(config.root, scriptzcmlfilename))
44+
45 from zope.configuration import xmlconfig
46
47 # Hook up custom component architecture calls
48
49=== modified file 'lib/devscripts/ec2test/testrunner.py'
50--- lib/devscripts/ec2test/testrunner.py 2010-03-18 10:42:32 +0000
51+++ lib/devscripts/ec2test/testrunner.py 2010-03-18 22:30:44 +0000
52@@ -400,6 +400,10 @@
53 '-p/var/launchpad/tmp -t/var/launchpad/test'),
54 # set up database
55 p('/var/launchpad/test/utilities/launchpad-database-setup $USER')
56+ p('mkdir -p /var/tmp/launchpad_mailqueue/cur')
57+ p('mkdir -p /var/tmp/launchpad_mailqueue/new')
58+ p('mkdir -p /var/tmp/launchpad_mailqueue/tmp')
59+ p('chmod -R a-w /var/tmp/launchpad_mailqueue/')
60 # close ssh connection
61 user_connection.close()
62
63
64=== renamed file 'lib/lp/soyuz/doc/sampledata-setup.txt.disabled' => 'lib/lp/soyuz/doc/sampledata-setup.txt'
65=== added file 'script-testing.zcml'
66--- script-testing.zcml 1970-01-01 00:00:00 +0000
67+++ script-testing.zcml 2010-03-18 22:30:44 +0000
68@@ -0,0 +1,8 @@
69+<!-- Copyright 2010 Canonical Ltd. This software is licensed under the
70+ GNU Affero General Public License version 3 (see the file LICENSE).
71+-->
72+
73+<configure xmlns="http://namespaces.zope.org/zope">
74+ <include file="script.zcml" />
75+ <includeOverrides files="package-includes/*-configure-testing.zcml" />
76+</configure>