~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/buildd/test_buildd_generatetranslationtemplates

  • Committer: mbp at canonical
  • Date: 2011-11-20 23:37:23 UTC
  • mto: This revision was merged to the branch mainline in revision 14344.
  • Revision ID: mbp@canonical.com-20111120233723-370p96db2crru5tm
Delete canonical.buildd again

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
2
 
# Copyright 2010 Canonical Ltd.  This software is licensed under the
3
 
# GNU Affero General Public License version 3 (see the file LICENSE).
4
 
#
5
 
# Test script for manual use only.  Exercises the
6
 
# TranslationTemplatesBuildManager through XMLRPC.
7
 
 
8
 
import sys
9
 
 
10
 
from xmlrpclib import ServerProxy
11
 
 
12
 
if len(sys.argv) != 2:
13
 
    print "Usage: %s <chroot_sha1>" % sys.argv[0]
14
 
    print "Where <chroot_sha1> is the SHA1 of the chroot tarball to use."
15
 
    print "The chroot tarball must be in the local Librarian."
16
 
    print "See https://dev.launchpad.net/Soyuz/HowToUseSoyuzLocally"
17
 
    sys.exit(1)
18
 
 
19
 
chroot_sha1 = sys.argv[1]
20
 
 
21
 
proxy = ServerProxy('http://localhost:8221/rpc')
22
 
print proxy.info()
23
 
print proxy.status()
24
 
buildid = '1-2'
25
 
build_type = 'translation-templates'
26
 
filemap = {}
27
 
args = {'branch_url': 'no-branch-here-sorry'}
28
 
print proxy.build(buildid, build_type, chroot_sha1, filemap, args)
29
 
#status = proxy.status()
30
 
#for filename, sha1 in status[3].iteritems():
31
 
#    print filename
32
 
#proxy.clean()
33