Merge lp:~brendan-donegan/phablet-tools/phablet_click_test_setup_ppa into lp:phablet-tools

Proposed by Brendan Donegan
Status: Needs review
Proposed branch: lp:~brendan-donegan/phablet-tools/phablet_click_test_setup_ppa
Merge into: lp:phablet-tools
Diff against target: 61 lines (+21/-2)
1 file modified
phablet-click-test-setup (+21/-2)
To merge this branch: bzr merge lp:~brendan-donegan/phablet-tools/phablet_click_test_setup_ppa
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+235007@code.launchpad.net

Commit message

Add --silo option to phablet-click-test-setup

Description of the change

Add a --silo option so that phablet-click-test-setup can work when one of the packages it needs to get the source for is in a silo and not in the archive - usually happens in the case of UITK or unity 8 landings. I need feedback on:

1.) Should it work with PPAs in general instead of just silos?
2.) Should it look in the silo first and then the archive for the package - is this important?

To post a comment you must log in.
309. By Brendan Donegan

flake8 fix

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:309
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~brendan-donegan/phablet-tools/phablet_click_test_setup_ppa/+merge/235007/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/phablet-tools-ci/389/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-tools-utopic-amd64-ci/70
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-tools-utopic-armhf-ci/70
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-tools-utopic-i386-ci/70

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-tools-ci/389/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

309. By Brendan Donegan

flake8 fix

308. By Brendan Donegan

Add --silo option so p-c-t-s can work when a silo is installed

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'phablet-click-test-setup'
2--- phablet-click-test-setup 2014-09-05 21:02:02 +0000
3+++ phablet-click-test-setup 2014-09-17 15:56:09 +0000
4@@ -45,7 +45,11 @@
5 def series(self):
6 return self._series
7
8- def __init__(self, distribution, release, arch):
9+ @property
10+ def silo(self):
11+ return self._silo
12+
13+ def __init__(self, distribution, release, arch, silo):
14 self.lp = Launchpad.login_anonymously('phablet-click-test-setup',
15 'production',
16 '~/.launchpadlib/cache',
17@@ -54,6 +58,11 @@
18 self._series = distro.getSeries(name_or_version=release)
19 self._arch_series = self._series.getDistroArchSeries(archtag=arch)
20 self._archive = self.lp.distributions[distribution].main_archive
21+ if silo:
22+ self._silo = self.lp.people['ci-train-ppa-service'].getPPAByName(
23+ distribution=distro,
24+ name=silo
25+ )
26
27
28 lp = None
29@@ -114,6 +123,8 @@
30 help='Selects distribution to use')
31 parser.add_argument('--series', default=None,
32 help='Selects series to use')
33+ parser.add_argument('--silo', default=None,
34+ help='Specify a Silo to use')
35 return parser.parse_args()
36
37
38@@ -179,6 +190,14 @@
39 status="Published", pocket='Release',
40 exact_match=True)
41 # TODO needs filtering
42+ if len(sp) == 0:
43+ # Look in the PPA instead
44+ sp = lp.silo.getPublishedSources(
45+ source_name=package,
46+ version=version,
47+ distro_series=lp.series,
48+ status="Published", pocket='Release',
49+ exact_match=True)
50 source_url = sp[0].sourceFileUrls()[0]
51 print('Downloading %s version %s from %s' % (package, version, source_url))
52 url = urllib2.urlopen(source_url)
53@@ -257,7 +276,7 @@
54 arch = adb.shell('sudo -iu phablet dpkg --print-architecture').strip()
55 if not args.series:
56 args.series = adb.shell('lsb_release -c -s').strip()
57- lp = LP(args.distribution, args.series, arch)
58+ lp = LP(args.distribution, args.series, arch, args.silo)
59 test_dir = tempfile.mkdtemp()
60 os.mkdir(os.path.join(test_dir, py2_subdir))
61 atexit.register(cleanup, test_dir)

Subscribers

People subscribed via source and target branches