Merge lp:~cprov/britney/boottest-integration-tweak into lp:~canonical-ci-engineering/britney/boottesting-support

Proposed by Celso Providelo
Status: Merged
Merged at revision: 458
Proposed branch: lp:~cprov/britney/boottest-integration-tweak
Merge into: lp:~canonical-ci-engineering/britney/boottesting-support
Diff against target: 81 lines (+18/-4)
2 files modified
boottest.py (+11/-1)
tests/test_boottest.py (+7/-3)
To merge this branch: bzr merge lp:~cprov/britney/boottest-integration-tweak
Reviewer Review Type Date Requested Status
Joe Talbott (community) Approve
Review via email: mp+248810@code.launchpad.net

Description of the change

Integration tweaks for the current fork of auto-package-testing project.

To post a comment you must log in.
Revision history for this message
Joe Talbott (joetalbott) wrote :

LGTM - Is the plan to eventually remove at least the -U part?

review: Approve
458. By Celso Providelo

boottest-britney debug options respects BOOTTEST_DEBUG configuration option.

459. By Celso Providelo

Fix BootTest.get_status to return status for the latest known version. Boottests results are reported for the current (published) version, not the proposed one.

460. By Celso Providelo

Restore boottest status lookup by source name & version.

461. By Celso Providelo

Re-fix get_status() doc string and remove commented code.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'boottest.py'
2--- boottest.py 2015-02-05 16:20:28 +0000
3+++ boottest.py 2015-02-06 16:16:55 +0000
4@@ -171,7 +171,7 @@
5 aptroot: ~/.chdist/%s-proposed-armhf/
6 apturi: file:%s/mirror/%s
7 components: main restricted universe multiverse
8- rsync_host: rsync://tachash.ubuntu-ci/adt/
9+ rsync_host: rsync://tachash.ubuntu-ci/boottest/
10 datadir: ~/proposed-migration/boottest/data""" %
11 (self.series, self.series, home, self.distribution)),
12 file=rc_file)
13@@ -186,7 +186,10 @@
14 self.script_path,
15 "-c", self.rc_path,
16 "-r", self.series,
17+ "-PU",
18 ]
19+ if self.debug:
20+ command.append("-d")
21 command.extend(args)
22 return subprocess.check_output(command).strip()
23
24@@ -239,6 +242,13 @@
25 """Collects boottests results and updates internal registry."""
26 self._run("collect", "-O", self._result_path)
27 self._read()
28+ if not self.britney.options.verbose:
29+ return
30+ for src in sorted(self.pkglist):
31+ for ver in sorted(self.pkglist[src], cmp=apt_pkg.version_compare):
32+ status = self.pkglist[src][ver]
33+ print("I: [%s] - Collected boottest status for %s_%s: "
34+ "%s" % (time.asctime(), src, ver, status))
35
36 def needs_test(self, name, version):
37 """Whether or not the given source and version should be tested.
38
39=== modified file 'tests/test_boottest.py'
40--- tests/test_boottest.py 2015-02-05 22:27:39 +0000
41+++ tests/test_boottest.py 2015-02-06 16:16:55 +0000
42@@ -151,6 +151,7 @@
43 self.create_manifest([
44 'green 1.0',
45 'pyqt5:armhf 1.0',
46+ 'signon 1.0'
47 ])
48
49 def create_manifest(self, lines):
50@@ -176,6 +177,7 @@
51 green 1.1~beta RUNNING
52 pyqt5-src 1.1~beta PASS
53 pyqt5-src 1.1 FAIL
54+signon 1.1 PASS
55 """
56
57 def request():
58@@ -195,6 +197,9 @@
59 p = argparse.ArgumentParser()
60 p.add_argument('-r')
61 p.add_argument('-c')
62+p.add_argument('-d', default=False, action='store_true')
63+p.add_argument('-P', default=False, action='store_true')
64+p.add_argument('-U', default=False, action='store_true')
65
66 sp = p.add_subparsers()
67
68@@ -263,11 +268,10 @@
69 # promotion.
70 context = []
71 context.append(
72- ('pyqt5', {'Source': 'pyqt5-src', 'Version': '1.1~beta',
73- 'Architecture': 'all'}))
74+ ('signon', {'Version': '1.1', 'Architecture': 'armhf'}))
75 self.do_test(
76 context,
77- [r'\bpyqt5-src\b.*\(- to .*>1.1~beta<',
78+ [r'\bsignon\b.*\(- to .*>1.1<',
79 '<li>Boottest result: {}'.format(
80 boottest.BootTest.EXCUSE_LABELS['PASS']),
81 '<li>Valid candidate'])

Subscribers

People subscribed via source and target branches