2
# Copyright 2010 Canonical Ltd. This software is licensed under the
3
# GNU Affero General Public License version 3 (see the file LICENSE).
5
# This is a script to do end-to-end testing of the buildd with a bzr-builder
6
# recipe, without involving the BuilderBehaviour.
9
apt_cacher_ng_host = 'stumpy'
10
distroseries_name = 'maverick'
11
recipe_text = """# bzr-builder format 0.2 deb-version {debupstream}-0~{revno}
12
http://bazaar.launchpad.dev/~ppa-user/+junk/wakeonlan"""
14
def deb_line(host, suites):
15
prefix = 'deb http://'
16
if apt_cacher_ng_host != None:
17
prefix += '%s:3142/' % apt_cacher_ng_host
18
return '%s%s %s %s' % (prefix, host, distroseries_name, suites)
21
from xmlrpclib import ServerProxy
23
proxy = ServerProxy('http://localhost:8221/rpc')
24
print proxy.echo('Hello World')
26
status = proxy.status()
28
if status[0] != 'BuilderStatus.IDLE':
29
print "Aborting due to non-IDLE builder."
32
'1-2', 'sourcepackagerecipe', '1ef177161c3cb073e66bf1550931c6fbaa0a94b0',
33
{}, {'author_name': u'Steve\u1234',
34
'author_email': 'stevea@example.org',
35
'suite': distroseries_name,
36
'distroseries_name': distroseries_name,
37
'ogrecomponent': 'universe',
38
'archive_purpose': 'puppies',
39
'recipe_text': recipe_text,
41
deb_line('%s.archive.ubuntu.com/ubuntu' % country_code,
43
deb_line('ppa.launchpad.net/launchpad/bzr-builder-dev/ubuntu',
45
#status = proxy.status()
46
#for filename, sha1 in status[3].iteritems():