Merge ~fourdollars/pc-enablement/+git/oem-scripts:master into ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master
- Git
- lp:~fourdollars/pc-enablement/+git/oem-scripts
- master
- Merge into master
Status: | Merged |
---|---|
Merged at revision: | 4baba105b3d1677c97b10f86131c904283b1f810 |
Proposed branch: | ~fourdollars/pc-enablement/+git/oem-scripts:master |
Merge into: | ~oem-solutions-engineers/pc-enablement/+git/oem-scripts:master |
Diff against target: |
321 lines (+200/-18) 8 files modified
debian/changelog (+13/-0) debian/tests/pkg-list (+4/-0) oem-meta-packages (+151/-0) oem_scripts/LaunchpadLogin.py (+1/-1) pkg-list (+28/-17) setup.py (+1/-0) tests/test_flake8 (+1/-0) tests/test_pep8 (+1/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Yuan-Chen Cheng (community) | Approve | ||
Review via email: mp+394863@code.launchpad.net |
Commit message
Description of the change
linux-image-
$ pkg-list --apt-dir /tmp/apt.W1fko1dluV linux-oem --exclude /tmp/apt.
amd64-microcode 3.20191021.
intel-microcode 3.20201110.
iucode-tool 2.3.1-1
linux-firmware 1.173.19
linux-headers-
linux-headers-oem 4.15.0.1104.108
linux-image-oem 4.15.0.1104.108
linux-oem 4.15.0.1104.108
linux-oem-
$ pkg-list --apt-dir /tmp/apt.W1fko1dluV linux-oem --exclude /tmp/apt.
<ERROR> linux-image-
$ run-autopkgtest lxc focal -t pkg-list -C
...
pkg-list PASS
autopkgtest-
$ grep ERROR autopkgtest-
<ERROR> python3:any is unavailable.
It is usual to see some Debian package still unavailable in proposed channel.
Alex Tu (alextu) wrote : | # |
Alex Tu (alextu) wrote : | # |
LGTM.
Shih-Yuan Lee (fourdollars) wrote : | # |
$ cat autopkgtest-
mir-bug-
autopkgtest-
autopkgtest-
pkg-somerville-meta PASS
pkg-sutton-meta PASS
pkg-stella-meta PASS
launchpad-api PASS
get-private-ppa PASS
jq-lp PASS
mir-bug PASS
run-autopkgtest PASS
bug-bind PASS
pkg-list PASS
setup-apt-dir PASS
git-url-
autopkgtest-
Shih-Yuan Lee (fourdollars) wrote : | # |
$ ./oem-meta-packages subscribe
<INFO> Using oem-scripts login
<INFO> Loading KWallet
<INFO> Loading SecretService
<INFO> Loading Windows
<INFO> Loading chainer
<INFO> Loading macOS
<INFO> Checking the subscriptions for oem-somerville-
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-sutton.
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-sutton.
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-sutton.
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-sutton.
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-sutton.
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-sutton.
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-sutton.
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-somerville-
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-sutton.
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-somerville-
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-sutton.
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-somerville-
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-sutton.
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-somerville-
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-somerville-
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-somerville-
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-qemu-meta...
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-sutton.
<INFO> ubuntu/
<INFO> Checking the subscriptions for oem-sutton.
<INFO> ubuntu/oem-sutto...
Yuan-Chen Cheng (ycheng-twn) wrote : | # |
for change related to pkg-list, they are LGTM.
Yuan-Chen Cheng (ycheng-twn) wrote : | # |
note: talk in the f2f with $4, I think there could be some other better place to do what oem-meta-packages is doing.
However, he can't think any other script fits. Give so, approve it.
Preview Diff
1 | diff --git a/debian/changelog b/debian/changelog | |||
2 | index 4545eb5..20ad464 100644 | |||
3 | --- a/debian/changelog | |||
4 | +++ b/debian/changelog | |||
5 | @@ -1,3 +1,16 @@ | |||
6 | 1 | oem-scripts (0.71) UNRELEASED; urgency=medium | ||
7 | 2 | |||
8 | 3 | * pkg-list: Add an option '--fail-unavailable' to return unavailable error. | ||
9 | 4 | * pkg-list: Refine the checking for depends. | ||
10 | 5 | * oem-meta-packages, | ||
11 | 6 | oem_scripts/LaunchpadLogin.py, | ||
12 | 7 | setup.py, | ||
13 | 8 | tests/test_flake8, | ||
14 | 9 | tests/test_pep8: Add oem-meta-packages to subscribe the bugs of oem meta | ||
15 | 10 | packages. | ||
16 | 11 | |||
17 | 12 | -- Shih-Yuan Lee (FourDollars) <sylee@canonical.com> Fri, 04 Dec 2020 14:50:37 +0800 | ||
18 | 13 | |||
19 | 1 | oem-scripts (0.70) focal; urgency=medium | 14 | oem-scripts (0.70) focal; urgency=medium |
20 | 2 | 15 | ||
21 | 3 | * mir-bug, | 16 | * mir-bug, |
22 | diff --git a/debian/tests/pkg-list b/debian/tests/pkg-list | |||
23 | index ae02e8d..92dfe33 100644 | |||
24 | --- a/debian/tests/pkg-list | |||
25 | +++ b/debian/tests/pkg-list | |||
26 | @@ -1,9 +1,13 @@ | |||
27 | 1 | #!/bin/bash | 1 | #!/bin/bash |
28 | 2 | 2 | ||
29 | 3 | echo "=== Enable focal proposed channel ===" | ||
30 | 3 | APTDIR=$(setup-apt-dir.sh -c focal -m http://uk.archive.ubuntu.com/ubuntu -p | tail -n1) | 4 | APTDIR=$(setup-apt-dir.sh -c focal -m http://uk.archive.ubuntu.com/ubuntu -p | tail -n1) |
31 | 4 | 5 | ||
32 | 5 | echo "=== ubuntu-desktop --recommends ===" | 6 | echo "=== ubuntu-desktop --recommends ===" |
33 | 6 | pkg-list --apt-dir "$APTDIR" ubuntu-desktop --recommends | tee ubuntu-desktop.list | 7 | pkg-list --apt-dir "$APTDIR" ubuntu-desktop --recommends | tee ubuntu-desktop.list |
34 | 8 | if ! pkg-list --apt-dir "$APTDIR" ubuntu-desktop --recommends --fail-unavailable; then | ||
35 | 9 | echo "It is usual to see some Debian package still unavailable in proposed channel." | ||
36 | 10 | fi | ||
37 | 7 | 11 | ||
38 | 8 | echo "=== dkms ===" | 12 | echo "=== dkms ===" |
39 | 9 | pkg-list --apt-dir "$APTDIR" dkms --exclude ubuntu-desktop.list | tee dkms.list | 13 | pkg-list --apt-dir "$APTDIR" dkms --exclude ubuntu-desktop.list | tee dkms.list |
40 | diff --git a/oem-meta-packages b/oem-meta-packages | |||
41 | 10 | new file mode 100755 | 14 | new file mode 100755 |
42 | index 0000000..2deb366 | |||
43 | --- /dev/null | |||
44 | +++ b/oem-meta-packages | |||
45 | @@ -0,0 +1,151 @@ | |||
46 | 1 | #!/usr/bin/env python3 | ||
47 | 2 | # -*- coding: utf-8 -*- | ||
48 | 3 | # Copyright (C) 2020 Canonical Ltd. | ||
49 | 4 | # Author: Shih-Yuan Lee (FourDollars) <sylee@canonical.com> | ||
50 | 5 | # | ||
51 | 6 | # This program is free software; you can redistribute it and/or modify | ||
52 | 7 | # it under the terms of the GNU General Public License as published by | ||
53 | 8 | # the Free Software Foundation; either version 3 of the License, or | ||
54 | 9 | # (at your option) any later version. | ||
55 | 10 | # | ||
56 | 11 | # This program is distributed in the hope that it will be useful, | ||
57 | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
58 | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
59 | 14 | # GNU General Public License for more details. | ||
60 | 15 | # | ||
61 | 16 | # You should have received a copy of the GNU General Public License | ||
62 | 17 | # along with this program; if not, write to the Free Software | ||
63 | 18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
64 | 19 | |||
65 | 20 | import argparse | ||
66 | 21 | import difflib | ||
67 | 22 | import lazr | ||
68 | 23 | import os | ||
69 | 24 | import types | ||
70 | 25 | |||
71 | 26 | from apt import apt_pkg | ||
72 | 27 | from logging import info, warning, error, debug # , critical | ||
73 | 28 | from oem_scripts.LaunchpadLogin import LaunchpadLogin | ||
74 | 29 | from oem_scripts.logging import setup_logging | ||
75 | 30 | |||
76 | 31 | parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, | ||
77 | 32 | epilog=""" | ||
78 | 33 | Make all bugs of all oem meta packages be subscribed by oem-solutions-engineers. | ||
79 | 34 | (search current apt source for package lists) | ||
80 | 35 | |||
81 | 36 | Check "To all bugs in oem-qemu-meta in Ubuntu:" on https://launchpad.net/ubuntu/+source/oem-qemu-meta/+subscribe for example. | ||
82 | 37 | |||
83 | 38 | examples: | ||
84 | 39 | oem-meta-packages subscribe""") | ||
85 | 40 | |||
86 | 41 | parser.add_argument("-d", "--debug", | ||
87 | 42 | help="print debug messages", action="store_true") | ||
88 | 43 | parser.add_argument("-q", "--quiet", | ||
89 | 44 | help="Don't print info messages", action="store_true") | ||
90 | 45 | parser.add_argument("-v", "--verbose", action="store_true", | ||
91 | 46 | help="print verbose messages") | ||
92 | 47 | parser.add_argument("--apt-dir", | ||
93 | 48 | type=str, | ||
94 | 49 | help="specify the dir for apt") | ||
95 | 50 | |||
96 | 51 | subparsers = parser.add_subparsers(dest="subcommand") | ||
97 | 52 | |||
98 | 53 | subscribe = subparsers.add_parser('subscribe', help='[-h] [--yes]') | ||
99 | 54 | subscribe.add_argument("--yes", | ||
100 | 55 | help="Say yes for all prompts.", action="store_true") | ||
101 | 56 | |||
102 | 57 | unsubscribe = subparsers.add_parser('unsubscribe', help='[-h] [--yes] pkgName') | ||
103 | 58 | unsubscribe.add_argument("pkgName", type=str, | ||
104 | 59 | help="Specify the package name to unsubscribe.") | ||
105 | 60 | unsubscribe.add_argument("--yes", | ||
106 | 61 | help="Say yes for all prompts.", action="store_true") | ||
107 | 62 | |||
108 | 63 | args = parser.parse_args() | ||
109 | 64 | |||
110 | 65 | setup_logging(debug=args.debug, quiet=args.quiet) | ||
111 | 66 | |||
112 | 67 | if args.subcommand: | ||
113 | 68 | login = LaunchpadLogin() | ||
114 | 69 | lp = login.lp | ||
115 | 70 | |||
116 | 71 | if args.apt_dir: | ||
117 | 72 | apt_pkg.init_config() | ||
118 | 73 | if args.debug: | ||
119 | 74 | old = apt_pkg.config.dump() | ||
120 | 75 | apt_pkg.config.set("Dir", args.apt_dir) | ||
121 | 76 | apt_pkg.config.set("Dir::State::status", os.path.join(args.apt_dir, "var/lib/dpkg/status")) | ||
122 | 77 | if args.debug: | ||
123 | 78 | new = apt_pkg.config.dump() | ||
124 | 79 | d = difflib.Differ() | ||
125 | 80 | diff = d.compare(old.split('\n'), new.split('\n')) | ||
126 | 81 | for line in diff: | ||
127 | 82 | debug(line.strip()) | ||
128 | 83 | apt_pkg.init_system() | ||
129 | 84 | |||
130 | 85 | |||
131 | 86 | def yes_or_ask(yes: bool, message: str) -> bool: | ||
132 | 87 | if yes: | ||
133 | 88 | print(f"> \033[1;34m{message}\033[1;0m (y/n) y") | ||
134 | 89 | return True | ||
135 | 90 | while True: | ||
136 | 91 | res = input(f"> \033[1;34m{message}\033[1;0m (y/n) ").lower() | ||
137 | 92 | if res not in {"y", "n"}: | ||
138 | 93 | continue | ||
139 | 94 | if res == 'y': | ||
140 | 95 | return True | ||
141 | 96 | else: | ||
142 | 97 | return False | ||
143 | 98 | |||
144 | 99 | |||
145 | 100 | def _debug_obj(pkg) -> None: | ||
146 | 101 | |||
147 | 102 | if not args.debug: | ||
148 | 103 | return | ||
149 | 104 | |||
150 | 105 | debug(dir(pkg)) | ||
151 | 106 | |||
152 | 107 | for attr in dir(pkg): | ||
153 | 108 | if not attr.startswith('__'): | ||
154 | 109 | if not isinstance(pkg.__getattribute__(attr), types.BuiltinFunctionType): | ||
155 | 110 | debug(f"{attr}: {pkg.__getattribute__(attr)}") | ||
156 | 111 | |||
157 | 112 | |||
158 | 113 | cache = apt_pkg.Cache(progress=None) | ||
159 | 114 | |||
160 | 115 | if args.subcommand == 'subscribe': | ||
161 | 116 | for pkg in cache.packages: | ||
162 | 117 | name = pkg.name | ||
163 | 118 | if not name.startswith('oem-') or not name.endswith('-meta'): | ||
164 | 119 | continue | ||
165 | 120 | info(f"Checking the subscriptions for {name}...") | ||
166 | 121 | source = lp.distributions['ubuntu'].getSourcePackage(name=name) | ||
167 | 122 | if 'oem-solutions-engineers' in map(lambda x: x.subscriber.name, source.getSubscriptions()): | ||
168 | 123 | info(f"ubuntu/{name} has subscribed oem-solutions-engineers.") | ||
169 | 124 | continue | ||
170 | 125 | warning(f"ubuntu/{name} didn't subscribe oem-solutions-engineers yet.") | ||
171 | 126 | if yes_or_ask(args.yes, f"Would you like to subscribe 'oem-solutions-engineers' for ubuntu/{name}?"): | ||
172 | 127 | try: | ||
173 | 128 | # When a person is subscribed to a source package, one actually subscribe all bugs for it. | ||
174 | 129 | source.addBugSubscription(subscriber=lp.people['oem-solutions-engineers']) | ||
175 | 130 | except lazr.restfulclient.errors.Unauthorized as e: | ||
176 | 131 | error(f"{lp.me.name} does not have permission to subscribe oem-solutions-engineers.") | ||
177 | 132 | if args.verbose: | ||
178 | 133 | print(e) | ||
179 | 134 | exit(1) | ||
180 | 135 | elif args.subcommand == 'unsubscribe': | ||
181 | 136 | source = lp.distributions['ubuntu'].getSourcePackage(name=args.pkgName) | ||
182 | 137 | subscriptions = source.getSubscriptions() | ||
183 | 138 | for subscription in subscriptions: | ||
184 | 139 | if subscription.subscriber.name == 'oem-solutions-engineers': | ||
185 | 140 | info(f"ubuntu/{args.pkgName} has subscribed oem-solutions-engineers.") | ||
186 | 141 | if yes_or_ask(args.yes, f"Would you like to unsubscribe 'oem-solutions-engineers' for ubuntu/{args.pkgName}?"): | ||
187 | 142 | try: | ||
188 | 143 | source.removeBugSubscription(subscriber=lp.people['oem-solutions-engineers']) | ||
189 | 144 | except lazr.restfulclient.errors.Unauthorized as e: | ||
190 | 145 | error(f"{lp.me.name} does not have permission to unsubscribe oem-solutions-engineers.") | ||
191 | 146 | if args.verbose: | ||
192 | 147 | print(e) | ||
193 | 148 | exit(1) | ||
194 | 149 | exit(0) | ||
195 | 150 | else: | ||
196 | 151 | parser.print_help() | ||
197 | diff --git a/oem_scripts/LaunchpadLogin.py b/oem_scripts/LaunchpadLogin.py | |||
198 | index 25c314f..0583ad2 100644 | |||
199 | --- a/oem_scripts/LaunchpadLogin.py | |||
200 | +++ b/oem_scripts/LaunchpadLogin.py | |||
201 | @@ -67,7 +67,7 @@ class LaunchpadLogin(): | |||
202 | 67 | logging.info("Using anonymously login") | 67 | logging.info("Using anonymously login") |
203 | 68 | self.lp = Launchpad.login_anonymously(application_name, service_root) | 68 | self.lp = Launchpad.login_anonymously(application_name, service_root) |
204 | 69 | elif ":" in launchpad_token: | 69 | elif ":" in launchpad_token: |
206 | 70 | oauth_token, oauth_token_secret, oauth_consumer_key = launchpad_token.split(":") | 70 | oauth_token, oauth_token_secret, oauth_consumer_key = launchpad_token.split(":", maxsplit=2) |
207 | 71 | self.lp = Launchpad.login(oauth_consumer_key, | 71 | self.lp = Launchpad.login(oauth_consumer_key, |
208 | 72 | oauth_token, | 72 | oauth_token, |
209 | 73 | oauth_token_secret, | 73 | oauth_token_secret, |
210 | diff --git a/pkg-list b/pkg-list | |||
211 | index ac844db..42351d5 100755 | |||
212 | --- a/pkg-list | |||
213 | +++ b/pkg-list | |||
214 | @@ -25,7 +25,7 @@ import sys | |||
215 | 25 | import types | 25 | import types |
216 | 26 | 26 | ||
217 | 27 | from apt import apt_pkg | 27 | from apt import apt_pkg |
219 | 28 | from logging import debug, error, critical # info, warning | 28 | from logging import debug, error, critical, info # , warning |
220 | 29 | from urllib.parse import urljoin | 29 | from urllib.parse import urljoin |
221 | 30 | 30 | ||
222 | 31 | 31 | ||
223 | @@ -59,6 +59,9 @@ parser.add_argument("--suggests", | |||
224 | 59 | parser.add_argument("--non-installed", | 59 | parser.add_argument("--non-installed", |
225 | 60 | action="store_true", | 60 | action="store_true", |
226 | 61 | help="only get non-installed packages per check current running environments") | 61 | help="only get non-installed packages per check current running environments") |
227 | 62 | parser.add_argument("--fail-unavailable", | ||
228 | 63 | action="store_true", | ||
229 | 64 | help="Return error when any package is unavailable.") | ||
230 | 62 | parser.add_argument("--exclude", | 65 | parser.add_argument("--exclude", |
231 | 63 | metavar='pkg.list', | 66 | metavar='pkg.list', |
232 | 64 | type=argparse.FileType('r', encoding='UTF-8'), | 67 | type=argparse.FileType('r', encoding='UTF-8'), |
233 | @@ -133,9 +136,18 @@ def get_depends(pkg_name: str, depends_list: list, recommends: bool, suggests: b | |||
234 | 133 | 136 | ||
235 | 134 | pkg = cache[pkg_name] | 137 | pkg = cache[pkg_name] |
236 | 135 | 138 | ||
237 | 139 | info(f"check {pkg_name}") | ||
238 | 136 | _debug_pkg(pkg) | 140 | _debug_pkg(pkg) |
239 | 137 | 141 | ||
240 | 142 | if args.fail_unavailable and not pkg.has_versions: | ||
241 | 143 | error(f"{pkg_name} is unavailable.") | ||
242 | 144 | exit(1) | ||
243 | 145 | |||
244 | 138 | for version in pkg.version_list: | 146 | for version in pkg.version_list: |
245 | 147 | if pkg_name in map(lambda x: x[0], depends_list): | ||
246 | 148 | continue | ||
247 | 149 | info(f"version {version.ver_str}") | ||
248 | 150 | _debug_pkg(version) | ||
249 | 139 | url = None | 151 | url = None |
250 | 140 | 152 | ||
251 | 141 | if not version.downloadable: | 153 | if not version.downloadable: |
252 | @@ -160,22 +172,21 @@ def get_depends(pkg_name: str, depends_list: list, recommends: bool, suggests: b | |||
253 | 160 | item = (pkg_name, version.ver_str, url, record.hashes.find("MD5Sum"), record.hashes.find("SHA1"), record.hashes.find("SHA256")) | 172 | item = (pkg_name, version.ver_str, url, record.hashes.find("MD5Sum"), record.hashes.find("SHA1"), record.hashes.find("SHA256")) |
254 | 161 | depends_list.append(item) | 173 | depends_list.append(item) |
255 | 162 | 174 | ||
272 | 163 | if 'Depends' not in version.depends_list_str: | 175 | for target in ('PreDepends', 'Depends', 'Recommends', 'Suggests'): |
273 | 164 | continue | 176 | if target == 'Recommends' and not recommends: |
274 | 165 | 177 | continue | |
275 | 166 | for depends in version.depends_list_str['Depends']: | 178 | if target == 'Suggests' and not suggests: |
276 | 167 | (name, ver, _) = depends[0] | 179 | continue |
277 | 168 | get_depends(name, depends_list, recommends=recommends, suggests=suggests, non_installed=non_installed) | 180 | if target not in version.depends_list_str: |
278 | 169 | 181 | continue | |
279 | 170 | if recommends and 'Recommends' in version.depends_list_str: | 182 | for depends in version.depends_list_str[target]: |
280 | 171 | for depends in version.depends_list_str['Recommends']: | 183 | for depend in depends: |
281 | 172 | (name, ver, _) = depends[0] | 184 | (name, ver, _) = depend |
282 | 173 | get_depends(name, depends_list, recommends=recommends, suggests=suggests, non_installed=non_installed) | 185 | pkg = cache[name] |
283 | 174 | 186 | if name in map(lambda x: x[0], depends_list): | |
284 | 175 | if suggests and 'Suggests' in version.depends_list_str: | 187 | continue |
285 | 176 | for depends in version.depends_list_str['Suggests']: | 188 | info(f"{pkg_name} {target} {name}") |
286 | 177 | (name, ver, _) = depends[0] | 189 | get_depends(name, depends_list, recommends=recommends, suggests=suggests, non_installed=non_installed) |
271 | 178 | get_depends(name, depends_list, recommends=recommends, suggests=suggests, non_installed=non_installed) | ||
287 | 179 | 190 | ||
288 | 180 | 191 | ||
289 | 181 | if args.apt_dir: | 192 | if args.apt_dir: |
290 | diff --git a/setup.py b/setup.py | |||
291 | index c598ec5..7984690 100644 | |||
292 | --- a/setup.py | |||
293 | +++ b/setup.py | |||
294 | @@ -45,6 +45,7 @@ Also there is a meta package oem-dev-tools that installs all scripts''', | |||
295 | 45 | 'lp-bug', | 45 | 'lp-bug', |
296 | 46 | 'live-build-image-chroot.sh', | 46 | 'live-build-image-chroot.sh', |
297 | 47 | 'oem-getiso', | 47 | 'oem-getiso', |
298 | 48 | 'oem-meta-packages', | ||
299 | 48 | 'pkg-list', | 49 | 'pkg-list', |
300 | 49 | 'pkg-oem-meta', | 50 | 'pkg-oem-meta', |
301 | 50 | 'rename-everything.py', | 51 | 'rename-everything.py', |
302 | diff --git a/tests/test_flake8 b/tests/test_flake8 | |||
303 | index 069a89d..c4b8daa 100755 | |||
304 | --- a/tests/test_flake8 | |||
305 | +++ b/tests/test_flake8 | |||
306 | @@ -3,4 +3,5 @@ | |||
307 | 3 | flake8 --ignore E501 \ | 3 | flake8 --ignore E501 \ |
308 | 4 | lp-bug \ | 4 | lp-bug \ |
309 | 5 | mir-bug \ | 5 | mir-bug \ |
310 | 6 | oem-meta-packages \ | ||
311 | 6 | pkg-list | 7 | pkg-list |
312 | diff --git a/tests/test_pep8 b/tests/test_pep8 | |||
313 | index 22fdd7e..e09071e 100755 | |||
314 | --- a/tests/test_pep8 | |||
315 | +++ b/tests/test_pep8 | |||
316 | @@ -11,4 +11,5 @@ pep8 --ignore=E501 \ | |||
317 | 11 | lp-bug \ | 11 | lp-bug \ |
318 | 12 | mir-bug \ | 12 | mir-bug \ |
319 | 13 | oem-getiso \ | 13 | oem-getiso \ |
320 | 14 | oem-meta-packages \ | ||
321 | 14 | pkg-list | 15 | pkg-list |
I'm thinking of the possibility of a unit test for pkg-list to capture all scenario of this script like what I did in pc-sanity package [1].
So, that we have confidence that any change would not impact expected behavior and the new scenarios could also be reviewed and verified easily through unit tests.
[1] https:/ /git.launchpad. net/plainbox- provider- pc-sanity/ tree/test