Merge lp:~lool/linaro-image-tools/shuffle-modules into lp:linaro-image-tools/11.11
- shuffle-modules
- Merge into trunk
Proposed by
Loïc Minier
Status: | Merged |
---|---|
Merged at revision: | 301 |
Proposed branch: | lp:~lool/linaro-image-tools/shuffle-modules |
Merge into: | lp:linaro-image-tools/11.11 |
Diff against target: |
641 lines (+99/-90) 30 files modified
.testr.conf (+1/-1) COPYING (+4/-4) linaro-hwpack-create (+2/-1) linaro-media-create (+11/-11) linaro_image_tools/hwpack/builder.py (+3/-3) linaro_image_tools/hwpack/hardwarepack.py (+2/-2) linaro_image_tools/hwpack/testing.py (+6/-3) linaro_image_tools/hwpack/tests/__init__.py (+8/-8) linaro_image_tools/hwpack/tests/test_better_tarfile.py (+1/-1) linaro_image_tools/hwpack/tests/test_builder.py (+6/-6) linaro_image_tools/hwpack/tests/test_config.py (+1/-1) linaro_image_tools/hwpack/tests/test_hardwarepack.py (+3/-3) linaro_image_tools/hwpack/tests/test_packages.py (+2/-2) linaro_image_tools/hwpack/tests/test_script.py (+3/-3) linaro_image_tools/hwpack/tests/test_tarfile_matchers.py (+2/-2) linaro_image_tools/hwpack/tests/test_testing.py (+2/-2) linaro_image_tools/media_create/__init__.py (+1/-1) linaro_image_tools/media_create/boards.py (+2/-2) linaro_image_tools/media_create/check_device.py (+1/-1) linaro_image_tools/media_create/hwpack.py (+2/-2) linaro_image_tools/media_create/partitions.py (+1/-1) linaro_image_tools/media_create/populate_boot.py (+1/-1) linaro_image_tools/media_create/rootfs.py (+1/-1) linaro_image_tools/media_create/tests/__init__.py (+1/-1) linaro_image_tools/media_create/tests/fixtures.py (+2/-2) linaro_image_tools/media_create/tests/test_media_create.py (+21/-18) linaro_image_tools/media_create/unpack_binary_tarball.py (+1/-1) linaro_image_tools/media_create/utils.py (+1/-1) linaro_image_tools/tests/__init__.py (+4/-2) linaro_image_tools/tests/integration.txt (+3/-3) |
To merge this branch: | bzr merge lp:~lool/linaro-image-tools/shuffle-modules |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guilherme Salgado (community) | Approve | ||
Review via email: mp+54618@code.launchpad.net |
Commit message
Description of the change
Shuffle modules to be under the same hierarchy:
- linaro_media_create -> linaro_
- hwpack -> linaro_
- tests -> linaro_
this will notably give us a place to share code between
linaro_
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.testr.conf' | |||
2 | --- .testr.conf 2010-11-22 13:17:27 +0000 | |||
3 | +++ .testr.conf 2011-03-23 22:28:34 +0000 | |||
4 | @@ -1,3 +1,3 @@ | |||
5 | 1 | [DEFAULT] | 1 | [DEFAULT] |
6 | 2 | test_command=python -m subunit.run $IDLIST | 2 | test_command=python -m subunit.run $IDLIST |
8 | 3 | test_id_list_default=tests.test_suite | 3 | test_id_list_default=linaro_image_tools.tests.test_suite |
9 | 4 | 4 | ||
10 | === modified file 'COPYING' | |||
11 | --- COPYING 2011-01-28 19:53:07 +0000 | |||
12 | +++ COPYING 2011-03-23 22:28:34 +0000 | |||
13 | @@ -3,11 +3,11 @@ | |||
14 | 3 | Maintainer: Linaro Infrastructure team <linaro-dev@linaro.org> | 3 | Maintainer: Linaro Infrastructure team <linaro-dev@linaro.org> |
15 | 4 | Source: https://launchpad.net/linaro-image-tools | 4 | Source: https://launchpad.net/linaro-image-tools |
16 | 5 | 5 | ||
19 | 6 | Files: linaro-hwpack-create linaro-hwpack-install hwpack/* | 6 | Files: linaro-hwpack-create linaro-hwpack-install linaro_image_tools/hwpack/* |
20 | 7 | Copyright: 2010, 2011 Linaro Limited | 7 | Copyright: 2010, 2011 Linaro Limited |
21 | 8 | License: GPL-2+ | 8 | License: GPL-2+ |
22 | 9 | 9 | ||
25 | 10 | Files: linaro-media-create linaro_media_create/* | 10 | Files: linaro-media-create linaro_image_tools/media_create/* |
26 | 11 | Copyright: 2010, 2011 Linaro Limited | 11 | Copyright: 2010, 2011 Linaro Limited |
27 | 12 | License: GPL-3+ | 12 | License: GPL-3+ |
28 | 13 | 13 | ||
29 | 14 | 14 | ||
30 | === modified file 'linaro-hwpack-create' | |||
31 | --- linaro-hwpack-create 2011-01-28 19:50:48 +0000 | |||
32 | +++ linaro-hwpack-create 2011-03-23 22:28:34 +0000 | |||
33 | @@ -24,7 +24,8 @@ | |||
34 | 24 | import logging | 24 | import logging |
35 | 25 | import sys | 25 | import sys |
36 | 26 | 26 | ||
38 | 27 | from hwpack.builder import ConfigFileMissing, HardwarePackBuilder | 27 | from linaro_image_tools.hwpack.builder import ( |
39 | 28 | ConfigFileMissing, HardwarePackBuilder) | ||
40 | 28 | 29 | ||
41 | 29 | 30 | ||
42 | 30 | if __name__ == '__main__': | 31 | if __name__ == '__main__': |
43 | 31 | 32 | ||
44 | === modified file 'linaro-media-create' | |||
45 | --- linaro-media-create 2011-02-11 15:49:23 +0000 | |||
46 | +++ linaro-media-create 2011-03-23 22:28:34 +0000 | |||
47 | @@ -23,25 +23,25 @@ | |||
48 | 23 | import sys | 23 | import sys |
49 | 24 | import tempfile | 24 | import tempfile |
50 | 25 | 25 | ||
55 | 26 | from linaro_media_create.boards import ( | 26 | from linaro_image_tools.media_create.boards import board_configs |
56 | 27 | board_configs, | 27 | from linaro_image_tools.media_create.check_device import ( |
53 | 28 | ) | ||
54 | 29 | from linaro_media_create.check_device import ( | ||
57 | 30 | confirm_device_selection_and_ensure_it_is_ready) | 28 | confirm_device_selection_and_ensure_it_is_ready) |
60 | 31 | from linaro_media_create.hwpack import install_hwpacks | 29 | from linaro_image_tools.media_create.hwpack import install_hwpacks |
61 | 32 | from linaro_media_create.partitions import ( | 30 | from linaro_image_tools.media_create.partitions import ( |
62 | 33 | Media, | 31 | Media, |
63 | 34 | setup_partitions, | 32 | setup_partitions, |
64 | 35 | get_uuid, | 33 | get_uuid, |
65 | 36 | ) | 34 | ) |
70 | 37 | from linaro_media_create.populate_boot import populate_boot | 35 | from linaro_image_tools.media_create.populate_boot import populate_boot |
71 | 38 | from linaro_media_create.rootfs import populate_rootfs | 36 | from linaro_image_tools.media_create.rootfs import populate_rootfs |
72 | 39 | from linaro_media_create.unpack_binary_tarball import unpack_binary_tarball | 37 | from linaro_image_tools.media_create.unpack_binary_tarball import ( |
73 | 40 | from linaro_media_create.utils import ( | 38 | unpack_binary_tarball, |
74 | 39 | ) | ||
75 | 40 | from linaro_image_tools.media_create.utils import ( | ||
76 | 41 | ensure_command, | 41 | ensure_command, |
77 | 42 | is_arm_host, | 42 | is_arm_host, |
78 | 43 | ) | 43 | ) |
80 | 44 | from linaro_media_create import ( | 44 | from linaro_image_tools.media_create import ( |
81 | 45 | cmd_runner, | 45 | cmd_runner, |
82 | 46 | get_args_parser | 46 | get_args_parser |
83 | 47 | ) | 47 | ) |
84 | 48 | 48 | ||
85 | === added directory 'linaro_image_tools' | |||
86 | === added file 'linaro_image_tools/__init__.py' | |||
87 | === renamed directory 'hwpack' => 'linaro_image_tools/hwpack' | |||
88 | === modified file 'linaro_image_tools/hwpack/builder.py' | |||
89 | --- hwpack/builder.py 2011-01-28 19:50:48 +0000 | |||
90 | +++ linaro_image_tools/hwpack/builder.py 2011-03-23 22:28:34 +0000 | |||
91 | @@ -22,9 +22,9 @@ | |||
92 | 22 | import logging | 22 | import logging |
93 | 23 | import errno | 23 | import errno |
94 | 24 | 24 | ||
98 | 25 | from hwpack.config import Config | 25 | from linaro_image_tools.hwpack.config import Config |
99 | 26 | from hwpack.hardwarepack import HardwarePack, Metadata | 26 | from linaro_image_tools.hwpack.hardwarepack import HardwarePack, Metadata |
100 | 27 | from hwpack.packages import ( | 27 | from linaro_image_tools.hwpack.packages import ( |
101 | 28 | FetchedPackage, | 28 | FetchedPackage, |
102 | 29 | LocalArchiveMaker, | 29 | LocalArchiveMaker, |
103 | 30 | PackageFetcher, | 30 | PackageFetcher, |
104 | 31 | 31 | ||
105 | === modified file 'linaro_image_tools/hwpack/hardwarepack.py' | |||
106 | --- hwpack/hardwarepack.py 2011-01-28 19:50:48 +0000 | |||
107 | +++ linaro_image_tools/hwpack/hardwarepack.py 2011-03-23 22:28:34 +0000 | |||
108 | @@ -21,8 +21,8 @@ | |||
109 | 21 | 21 | ||
110 | 22 | import time | 22 | import time |
111 | 23 | 23 | ||
114 | 24 | from hwpack.better_tarfile import writeable_tarfile | 24 | from linaro_image_tools.hwpack.better_tarfile import writeable_tarfile |
115 | 25 | from hwpack.packages import ( | 25 | from linaro_image_tools.hwpack.packages import ( |
116 | 26 | FetchedPackage, | 26 | FetchedPackage, |
117 | 27 | get_packages_file, | 27 | get_packages_file, |
118 | 28 | PackageMaker, | 28 | PackageMaker, |
119 | 29 | 29 | ||
120 | === modified file 'linaro_image_tools/hwpack/testing.py' | |||
121 | --- hwpack/testing.py 2011-01-28 19:50:48 +0000 | |||
122 | +++ linaro_image_tools/hwpack/testing.py 2011-03-23 22:28:34 +0000 | |||
123 | @@ -35,9 +35,12 @@ | |||
124 | 35 | from testtools import TestCase | 35 | from testtools import TestCase |
125 | 36 | from testtools.matchers import Annotate, Equals, Matcher, Mismatch | 36 | from testtools.matchers import Annotate, Equals, Matcher, Mismatch |
126 | 37 | 37 | ||
130 | 38 | from hwpack.better_tarfile import writeable_tarfile | 38 | from linaro_image_tools.hwpack.better_tarfile import writeable_tarfile |
131 | 39 | from hwpack.tarfile_matchers import TarfileHasFile | 39 | from linaro_image_tools.hwpack.tarfile_matchers import TarfileHasFile |
132 | 40 | from hwpack.packages import get_packages_file, FetchedPackage | 40 | from linaro_image_tools.hwpack.packages import ( |
133 | 41 | get_packages_file, | ||
134 | 42 | FetchedPackage, | ||
135 | 43 | ) | ||
136 | 41 | 44 | ||
137 | 42 | 45 | ||
138 | 43 | @contextmanager | 46 | @contextmanager |
139 | 44 | 47 | ||
140 | === modified file 'linaro_image_tools/hwpack/tests/__init__.py' | |||
141 | --- hwpack/tests/__init__.py 2011-01-28 19:50:48 +0000 | |||
142 | +++ linaro_image_tools/hwpack/tests/__init__.py 2011-03-23 22:28:34 +0000 | |||
143 | @@ -23,14 +23,14 @@ | |||
144 | 23 | 23 | ||
145 | 24 | def test_suite(): | 24 | def test_suite(): |
146 | 25 | module_names = [ | 25 | module_names = [ |
155 | 26 | 'hwpack.tests.test_better_tarfile', | 26 | 'linaro_image_tools.hwpack.tests.test_better_tarfile', |
156 | 27 | 'hwpack.tests.test_builder', | 27 | 'linaro_image_tools.hwpack.tests.test_builder', |
157 | 28 | 'hwpack.tests.test_config', | 28 | 'linaro_image_tools.hwpack.tests.test_config', |
158 | 29 | 'hwpack.tests.test_hardwarepack', | 29 | 'linaro_image_tools.hwpack.tests.test_hardwarepack', |
159 | 30 | 'hwpack.tests.test_packages', | 30 | 'linaro_image_tools.hwpack.tests.test_packages', |
160 | 31 | 'hwpack.tests.test_script', | 31 | 'linaro_image_tools.hwpack.tests.test_script', |
161 | 32 | 'hwpack.tests.test_tarfile_matchers', | 32 | 'linaro_image_tools.hwpack.tests.test_tarfile_matchers', |
162 | 33 | 'hwpack.tests.test_testing', | 33 | 'linaro_image_tools.hwpack.tests.test_testing', |
163 | 34 | ] | 34 | ] |
164 | 35 | loader = unittest.TestLoader() | 35 | loader = unittest.TestLoader() |
165 | 36 | suite = loader.loadTestsFromNames(module_names) | 36 | suite = loader.loadTestsFromNames(module_names) |
166 | 37 | 37 | ||
167 | === modified file 'linaro_image_tools/hwpack/tests/test_better_tarfile.py' | |||
168 | --- hwpack/tests/test_better_tarfile.py 2011-01-28 19:50:48 +0000 | |||
169 | +++ linaro_image_tools/hwpack/tests/test_better_tarfile.py 2011-03-23 22:28:34 +0000 | |||
170 | @@ -25,7 +25,7 @@ | |||
171 | 25 | 25 | ||
172 | 26 | from testtools import TestCase | 26 | from testtools import TestCase |
173 | 27 | 27 | ||
175 | 28 | from hwpack.better_tarfile import writeable_tarfile | 28 | from linaro_image_tools.hwpack.better_tarfile import writeable_tarfile |
176 | 29 | 29 | ||
177 | 30 | 30 | ||
178 | 31 | @contextmanager | 31 | @contextmanager |
179 | 32 | 32 | ||
180 | === modified file 'linaro_image_tools/hwpack/tests/test_builder.py' | |||
181 | --- hwpack/tests/test_builder.py 2011-01-28 19:50:48 +0000 | |||
182 | +++ linaro_image_tools/hwpack/tests/test_builder.py 2011-03-23 22:28:34 +0000 | |||
183 | @@ -25,19 +25,19 @@ | |||
184 | 25 | from testtools import TestCase | 25 | from testtools import TestCase |
185 | 26 | from testtools.matchers import Equals | 26 | from testtools.matchers import Equals |
186 | 27 | 27 | ||
188 | 28 | from hwpack.builder import ( | 28 | from linaro_image_tools.hwpack.builder import ( |
189 | 29 | ConfigFileMissing, | 29 | ConfigFileMissing, |
190 | 30 | HardwarePackBuilder, | 30 | HardwarePackBuilder, |
191 | 31 | logger as builder_logger, | 31 | logger as builder_logger, |
192 | 32 | ) | 32 | ) |
196 | 33 | from hwpack.config import HwpackConfigError | 33 | from linaro_image_tools.hwpack.config import HwpackConfigError |
197 | 34 | from hwpack.hardwarepack import Metadata | 34 | from linaro_image_tools.hwpack.hardwarepack import Metadata |
198 | 35 | from hwpack.packages import ( | 35 | from linaro_image_tools.hwpack.packages import ( |
199 | 36 | FetchedPackage, | 36 | FetchedPackage, |
200 | 37 | PackageMaker, | 37 | PackageMaker, |
201 | 38 | ) | 38 | ) |
204 | 39 | from hwpack.tarfile_matchers import TarfileHasFile | 39 | from linaro_image_tools.hwpack.tarfile_matchers import TarfileHasFile |
205 | 40 | from hwpack.testing import ( | 40 | from linaro_image_tools.hwpack.testing import ( |
206 | 41 | AppendingHandler, | 41 | AppendingHandler, |
207 | 42 | AptSourceFixture, | 42 | AptSourceFixture, |
208 | 43 | ChdirToTempdirFixture, | 43 | ChdirToTempdirFixture, |
209 | 44 | 44 | ||
210 | === modified file 'linaro_image_tools/hwpack/tests/test_config.py' | |||
211 | --- hwpack/tests/test_config.py 2011-01-28 19:50:48 +0000 | |||
212 | +++ linaro_image_tools/hwpack/tests/test_config.py 2011-03-23 22:28:34 +0000 | |||
213 | @@ -23,7 +23,7 @@ | |||
214 | 23 | 23 | ||
215 | 24 | from testtools import TestCase | 24 | from testtools import TestCase |
216 | 25 | 25 | ||
218 | 26 | from hwpack.config import Config, HwpackConfigError | 26 | from linaro_image_tools.hwpack.config import Config, HwpackConfigError |
219 | 27 | 27 | ||
220 | 28 | 28 | ||
221 | 29 | class ConfigTests(TestCase): | 29 | class ConfigTests(TestCase): |
222 | 30 | 30 | ||
223 | === modified file 'linaro_image_tools/hwpack/tests/test_hardwarepack.py' | |||
224 | --- hwpack/tests/test_hardwarepack.py 2011-01-28 19:50:48 +0000 | |||
225 | +++ linaro_image_tools/hwpack/tests/test_hardwarepack.py 2011-03-23 22:28:34 +0000 | |||
226 | @@ -26,9 +26,9 @@ | |||
227 | 26 | from testtools import TestCase | 26 | from testtools import TestCase |
228 | 27 | from testtools.matchers import Equals | 27 | from testtools.matchers import Equals |
229 | 28 | 28 | ||
233 | 29 | from hwpack.hardwarepack import HardwarePack, Metadata | 29 | from linaro_image_tools.hwpack.hardwarepack import HardwarePack, Metadata |
234 | 30 | from hwpack.packages import get_packages_file | 30 | from linaro_image_tools.hwpack.packages import get_packages_file |
235 | 31 | from hwpack.testing import ( | 31 | from linaro_image_tools.hwpack.testing import ( |
236 | 32 | DummyFetchedPackage, | 32 | DummyFetchedPackage, |
237 | 33 | HardwarePackHasFile, | 33 | HardwarePackHasFile, |
238 | 34 | MatchesAsPackagesFile, | 34 | MatchesAsPackagesFile, |
239 | 35 | 35 | ||
240 | === modified file 'linaro_image_tools/hwpack/tests/test_packages.py' | |||
241 | --- hwpack/tests/test_packages.py 2011-01-28 19:50:48 +0000 | |||
242 | +++ linaro_image_tools/hwpack/tests/test_packages.py 2011-03-23 22:28:34 +0000 | |||
243 | @@ -33,7 +33,7 @@ | |||
244 | 33 | from testtools import TestCase | 33 | from testtools import TestCase |
245 | 34 | from testtools.matchers import Equals | 34 | from testtools.matchers import Equals |
246 | 35 | 35 | ||
248 | 36 | from hwpack.packages import ( | 36 | from linaro_image_tools.hwpack.packages import ( |
249 | 37 | DependencyNotSatisfied, | 37 | DependencyNotSatisfied, |
250 | 38 | DummyProgress, | 38 | DummyProgress, |
251 | 39 | FetchedPackage, | 39 | FetchedPackage, |
252 | @@ -45,7 +45,7 @@ | |||
253 | 45 | stringify_relationship, | 45 | stringify_relationship, |
254 | 46 | TemporaryDirectoryManager, | 46 | TemporaryDirectoryManager, |
255 | 47 | ) | 47 | ) |
257 | 48 | from hwpack.testing import ( | 48 | from linaro_image_tools.hwpack.testing import ( |
258 | 49 | AptSourceFixture, | 49 | AptSourceFixture, |
259 | 50 | ContextManagerFixture, | 50 | ContextManagerFixture, |
260 | 51 | DummyFetchedPackage, | 51 | DummyFetchedPackage, |
261 | 52 | 52 | ||
262 | === modified file 'linaro_image_tools/hwpack/tests/test_script.py' | |||
263 | --- hwpack/tests/test_script.py 2011-01-28 19:50:48 +0000 | |||
264 | +++ linaro_image_tools/hwpack/tests/test_script.py 2011-03-23 22:28:34 +0000 | |||
265 | @@ -22,8 +22,8 @@ | |||
266 | 22 | import os | 22 | import os |
267 | 23 | import subprocess | 23 | import subprocess |
268 | 24 | 24 | ||
271 | 25 | from hwpack.hardwarepack import Metadata | 25 | from linaro_image_tools.hwpack.hardwarepack import Metadata |
272 | 26 | from hwpack.testing import ( | 26 | from linaro_image_tools.hwpack.testing import ( |
273 | 27 | AptSourceFixture, | 27 | AptSourceFixture, |
274 | 28 | ChdirToTempdirFixture, | 28 | ChdirToTempdirFixture, |
275 | 29 | ConfigFileFixture, | 29 | ConfigFileFixture, |
276 | @@ -45,7 +45,7 @@ | |||
277 | 45 | script_name = "linaro-hwpack-create" | 45 | script_name = "linaro-hwpack-create" |
278 | 46 | this_path = os.path.abspath(__file__) | 46 | this_path = os.path.abspath(__file__) |
279 | 47 | parent_path = this_path | 47 | parent_path = this_path |
281 | 48 | for i in range(3): | 48 | for i in range(4): |
282 | 49 | parent_path = os.path.dirname(parent_path) | 49 | parent_path = os.path.dirname(parent_path) |
283 | 50 | possible_paths = [ | 50 | possible_paths = [ |
284 | 51 | os.path.join(parent_path, script_name), | 51 | os.path.join(parent_path, script_name), |
285 | 52 | 52 | ||
286 | === modified file 'linaro_image_tools/hwpack/tests/test_tarfile_matchers.py' | |||
287 | --- hwpack/tests/test_tarfile_matchers.py 2011-01-28 19:50:48 +0000 | |||
288 | +++ linaro_image_tools/hwpack/tests/test_tarfile_matchers.py 2011-03-23 22:28:34 +0000 | |||
289 | @@ -23,12 +23,12 @@ | |||
290 | 23 | 23 | ||
291 | 24 | from testtools import TestCase | 24 | from testtools import TestCase |
292 | 25 | 25 | ||
294 | 26 | from hwpack.tarfile_matchers import ( | 26 | from linaro_image_tools.hwpack.tarfile_matchers import ( |
295 | 27 | TarfileHasFile, | 27 | TarfileHasFile, |
296 | 28 | TarfileMissingPathMismatch, | 28 | TarfileMissingPathMismatch, |
297 | 29 | TarfileWrongValueMismatch, | 29 | TarfileWrongValueMismatch, |
298 | 30 | ) | 30 | ) |
300 | 31 | from hwpack.testing import test_tarfile | 31 | from linaro_image_tools.hwpack.testing import test_tarfile |
301 | 32 | 32 | ||
302 | 33 | 33 | ||
303 | 34 | class TarfileMissingPathMismatchTests(TestCase): | 34 | class TarfileMissingPathMismatchTests(TestCase): |
304 | 35 | 35 | ||
305 | === modified file 'linaro_image_tools/hwpack/tests/test_testing.py' | |||
306 | --- hwpack/tests/test_testing.py 2011-01-28 19:50:48 +0000 | |||
307 | +++ linaro_image_tools/hwpack/tests/test_testing.py 2011-03-23 22:28:34 +0000 | |||
308 | @@ -31,7 +31,7 @@ | |||
309 | 31 | Mismatch, | 31 | Mismatch, |
310 | 32 | NotEquals, | 32 | NotEquals, |
311 | 33 | ) | 33 | ) |
313 | 34 | from hwpack.testing import ( | 34 | from linaro_image_tools.hwpack.testing import ( |
314 | 35 | DummyFetchedPackage, | 35 | DummyFetchedPackage, |
315 | 36 | EachOf, | 36 | EachOf, |
316 | 37 | MatchesAsPackagesFile, | 37 | MatchesAsPackagesFile, |
317 | @@ -41,7 +41,7 @@ | |||
318 | 41 | MatchesSetwise, | 41 | MatchesSetwise, |
319 | 42 | parse_packages_file_content, | 42 | parse_packages_file_content, |
320 | 43 | ) | 43 | ) |
322 | 44 | from hwpack.packages import ( | 44 | from linaro_image_tools.hwpack.packages import ( |
323 | 45 | get_packages_file, | 45 | get_packages_file, |
324 | 46 | ) | 46 | ) |
325 | 47 | 47 | ||
326 | 48 | 48 | ||
327 | === renamed directory 'linaro_media_create' => 'linaro_image_tools/media_create' | |||
328 | === modified file 'linaro_image_tools/media_create/__init__.py' | |||
329 | --- linaro_media_create/__init__.py 2011-02-11 15:49:23 +0000 | |||
330 | +++ linaro_image_tools/media_create/__init__.py 2011-03-23 22:28:34 +0000 | |||
331 | @@ -19,7 +19,7 @@ | |||
332 | 19 | 19 | ||
333 | 20 | import argparse | 20 | import argparse |
334 | 21 | 21 | ||
336 | 22 | from linaro_media_create.boards import board_configs | 22 | from linaro_image_tools.media_create.boards import board_configs |
337 | 23 | 23 | ||
338 | 24 | 24 | ||
339 | 25 | KNOWN_BOARDS = board_configs.keys() | 25 | KNOWN_BOARDS = board_configs.keys() |
340 | 26 | 26 | ||
341 | === modified file 'linaro_image_tools/media_create/boards.py' | |||
342 | --- linaro_media_create/boards.py 2011-03-17 17:48:49 +0000 | |||
343 | +++ linaro_image_tools/media_create/boards.py 2011-03-23 22:28:34 +0000 | |||
344 | @@ -32,8 +32,8 @@ | |||
345 | 32 | import struct | 32 | import struct |
346 | 33 | from binascii import crc32 | 33 | from binascii import crc32 |
347 | 34 | 34 | ||
350 | 35 | from linaro_media_create import cmd_runner | 35 | from linaro_image_tools.media_create import cmd_runner |
351 | 36 | from linaro_media_create.partitions import SECTOR_SIZE | 36 | from linaro_image_tools.media_create.partitions import SECTOR_SIZE |
352 | 37 | 37 | ||
353 | 38 | # Notes: | 38 | # Notes: |
354 | 39 | # * since we align partitions on 4 MiB by default, geometry is currently 128 | 39 | # * since we align partitions on 4 MiB by default, geometry is currently 128 |
355 | 40 | 40 | ||
356 | === modified file 'linaro_image_tools/media_create/check_device.py' | |||
357 | --- linaro_media_create/check_device.py 2011-01-28 19:50:48 +0000 | |||
358 | +++ linaro_image_tools/media_create/check_device.py 2011-03-23 22:28:34 +0000 | |||
359 | @@ -21,7 +21,7 @@ | |||
360 | 21 | 21 | ||
361 | 22 | import dbus | 22 | import dbus |
362 | 23 | 23 | ||
364 | 24 | from linaro_media_create import partitions | 24 | from linaro_image_tools.media_create import partitions |
365 | 25 | 25 | ||
366 | 26 | 26 | ||
367 | 27 | def _get_system_bus_and_udisks_iface(): | 27 | def _get_system_bus_and_udisks_iface(): |
368 | 28 | 28 | ||
369 | === modified file 'linaro_image_tools/media_create/hwpack.py' | |||
370 | --- linaro_media_create/hwpack.py 2011-02-02 17:32:10 +0000 | |||
371 | +++ linaro_image_tools/media_create/hwpack.py 2011-03-23 22:28:34 +0000 | |||
372 | @@ -20,8 +20,8 @@ | |||
373 | 20 | import os | 20 | import os |
374 | 21 | import sys | 21 | import sys |
375 | 22 | 22 | ||
378 | 23 | from linaro_media_create import cmd_runner | 23 | from linaro_image_tools.media_create import cmd_runner |
379 | 24 | from linaro_media_create.utils import ( | 24 | from linaro_image_tools.media_create.utils import ( |
380 | 25 | is_arm_host, | 25 | is_arm_host, |
381 | 26 | find_command, | 26 | find_command, |
382 | 27 | ) | 27 | ) |
383 | 28 | 28 | ||
384 | === modified file 'linaro_image_tools/media_create/partitions.py' | |||
385 | --- linaro_media_create/partitions.py 2011-03-10 23:28:21 +0000 | |||
386 | +++ linaro_image_tools/media_create/partitions.py 2011-03-23 22:28:34 +0000 | |||
387 | @@ -30,7 +30,7 @@ | |||
388 | 30 | PARTITION_NORMAL, | 30 | PARTITION_NORMAL, |
389 | 31 | ) | 31 | ) |
390 | 32 | 32 | ||
392 | 33 | from linaro_media_create import cmd_runner | 33 | from linaro_image_tools.media_create import cmd_runner |
393 | 34 | 34 | ||
394 | 35 | 35 | ||
395 | 36 | HEADS = 128 | 36 | HEADS = 128 |
396 | 37 | 37 | ||
397 | === modified file 'linaro_image_tools/media_create/populate_boot.py' | |||
398 | --- linaro_media_create/populate_boot.py 2011-03-01 16:40:46 +0000 | |||
399 | +++ linaro_image_tools/media_create/populate_boot.py 2011-03-23 22:28:34 +0000 | |||
400 | @@ -19,7 +19,7 @@ | |||
401 | 19 | 19 | ||
402 | 20 | import os | 20 | import os |
403 | 21 | 21 | ||
405 | 22 | from linaro_media_create import cmd_runner | 22 | from linaro_image_tools.media_create import cmd_runner |
406 | 23 | 23 | ||
407 | 24 | 24 | ||
408 | 25 | def populate_boot(board_config, chroot_dir, rootfs_uuid, boot_partition, | 25 | def populate_boot(board_config, chroot_dir, rootfs_uuid, boot_partition, |
409 | 26 | 26 | ||
410 | === modified file 'linaro_image_tools/media_create/rootfs.py' | |||
411 | --- linaro_media_create/rootfs.py 2011-01-28 19:50:48 +0000 | |||
412 | +++ linaro_image_tools/media_create/rootfs.py 2011-03-23 22:28:34 +0000 | |||
413 | @@ -21,7 +21,7 @@ | |||
414 | 21 | import os | 21 | import os |
415 | 22 | import tempfile | 22 | import tempfile |
416 | 23 | 23 | ||
418 | 24 | from linaro_media_create import cmd_runner | 24 | from linaro_image_tools.media_create import cmd_runner |
419 | 25 | 25 | ||
420 | 26 | 26 | ||
421 | 27 | def populate_rootfs(content_dir, root_disk, partition, rootfs_type, | 27 | def populate_rootfs(content_dir, root_disk, partition, rootfs_type, |
422 | 28 | 28 | ||
423 | === modified file 'linaro_image_tools/media_create/tests/__init__.py' | |||
424 | --- linaro_media_create/tests/__init__.py 2011-01-11 21:26:54 +0000 | |||
425 | +++ linaro_image_tools/media_create/tests/__init__.py 2011-03-23 22:28:34 +0000 | |||
426 | @@ -1,7 +1,7 @@ | |||
427 | 1 | import unittest | 1 | import unittest |
428 | 2 | 2 | ||
429 | 3 | def test_suite(): | 3 | def test_suite(): |
431 | 4 | module_names = ['linaro_media_create.tests.test_media_create', | 4 | module_names = ['linaro_image_tools.media_create.tests.test_media_create', |
432 | 5 | ] | 5 | ] |
433 | 6 | loader = unittest.TestLoader() | 6 | loader = unittest.TestLoader() |
434 | 7 | suite = loader.loadTestsFromNames(module_names) | 7 | suite = loader.loadTestsFromNames(module_names) |
435 | 8 | 8 | ||
436 | === modified file 'linaro_image_tools/media_create/tests/fixtures.py' | |||
437 | --- linaro_media_create/tests/fixtures.py 2011-02-01 17:53:44 +0000 | |||
438 | +++ linaro_image_tools/media_create/tests/fixtures.py 2011-03-23 22:28:34 +0000 | |||
439 | @@ -22,8 +22,8 @@ | |||
440 | 22 | import subprocess | 22 | import subprocess |
441 | 23 | import tempfile | 23 | import tempfile |
442 | 24 | 24 | ||
445 | 25 | from linaro_media_create import partitions | 25 | from linaro_image_tools.media_create import partitions |
446 | 26 | from linaro_media_create import cmd_runner | 26 | from linaro_image_tools.media_create import cmd_runner |
447 | 27 | 27 | ||
448 | 28 | 28 | ||
449 | 29 | class CreateTempDirFixture(object): | 29 | class CreateTempDirFixture(object): |
450 | 30 | 30 | ||
451 | === modified file 'linaro_image_tools/media_create/tests/test_media_create.py' | |||
452 | --- linaro_media_create/tests/test_media_create.py 2011-03-18 13:37:32 +0000 | |||
453 | +++ linaro_image_tools/media_create/tests/test_media_create.py 2011-03-23 22:28:34 +0000 | |||
454 | @@ -31,9 +31,9 @@ | |||
455 | 31 | 31 | ||
456 | 32 | from testtools import TestCase | 32 | from testtools import TestCase |
457 | 33 | 33 | ||
459 | 34 | from hwpack.testing import TestCaseWithFixtures | 34 | from linaro_image_tools.hwpack.testing import TestCaseWithFixtures |
460 | 35 | 35 | ||
462 | 36 | from linaro_media_create import ( | 36 | from linaro_image_tools.media_create import ( |
463 | 37 | check_device, | 37 | check_device, |
464 | 38 | cmd_runner, | 38 | cmd_runner, |
465 | 39 | boards, | 39 | boards, |
466 | @@ -41,8 +41,8 @@ | |||
467 | 41 | rootfs, | 41 | rootfs, |
468 | 42 | utils, | 42 | utils, |
469 | 43 | ) | 43 | ) |
472 | 44 | import linaro_media_create | 44 | import linaro_image_tools.media_create |
473 | 45 | from linaro_media_create.boards import ( | 45 | from linaro_image_tools.media_create.boards import ( |
474 | 46 | LOADER_MIN_SIZE_S, | 46 | LOADER_MIN_SIZE_S, |
475 | 47 | SECTOR_SIZE, | 47 | SECTOR_SIZE, |
476 | 48 | align_up, | 48 | align_up, |
477 | @@ -58,7 +58,7 @@ | |||
478 | 58 | _get_mlo_file, | 58 | _get_mlo_file, |
479 | 59 | _run_mkimage, | 59 | _run_mkimage, |
480 | 60 | ) | 60 | ) |
482 | 61 | from linaro_media_create.hwpack import ( | 61 | from linaro_image_tools.media_create.hwpack import ( |
483 | 62 | copy_file, | 62 | copy_file, |
484 | 63 | install_hwpack, | 63 | install_hwpack, |
485 | 64 | install_hwpacks, | 64 | install_hwpacks, |
486 | @@ -66,7 +66,7 @@ | |||
487 | 66 | run_local_atexit_funcs, | 66 | run_local_atexit_funcs, |
488 | 67 | temporarily_overwrite_file_on_dir, | 67 | temporarily_overwrite_file_on_dir, |
489 | 68 | ) | 68 | ) |
491 | 69 | from linaro_media_create.partitions import ( | 69 | from linaro_image_tools.media_create.partitions import ( |
492 | 70 | HEADS, | 70 | HEADS, |
493 | 71 | SECTORS, | 71 | SECTORS, |
494 | 72 | calculate_partition_size_and_offset, | 72 | calculate_partition_size_and_offset, |
495 | @@ -81,23 +81,25 @@ | |||
496 | 81 | get_uuid, | 81 | get_uuid, |
497 | 82 | _parse_blkid_output, | 82 | _parse_blkid_output, |
498 | 83 | ) | 83 | ) |
501 | 84 | from linaro_media_create.populate_boot import populate_boot | 84 | from linaro_image_tools.media_create.populate_boot import populate_boot |
502 | 85 | from linaro_media_create.rootfs import ( | 85 | from linaro_image_tools.media_create.rootfs import ( |
503 | 86 | create_flash_kernel_config, | 86 | create_flash_kernel_config, |
504 | 87 | has_space_left_for_swap, | 87 | has_space_left_for_swap, |
505 | 88 | move_contents, | 88 | move_contents, |
506 | 89 | populate_rootfs, | 89 | populate_rootfs, |
507 | 90 | write_data_to_protected_file, | 90 | write_data_to_protected_file, |
508 | 91 | ) | 91 | ) |
511 | 92 | from linaro_media_create.unpack_binary_tarball import unpack_binary_tarball | 92 | from linaro_image_tools.media_create.unpack_binary_tarball import ( |
512 | 93 | from linaro_media_create.utils import ( | 93 | unpack_binary_tarball, |
513 | 94 | ) | ||
514 | 95 | from linaro_image_tools.media_create.utils import ( | ||
515 | 94 | ensure_command, | 96 | ensure_command, |
516 | 95 | find_command, | 97 | find_command, |
517 | 96 | install_package_providing, | 98 | install_package_providing, |
518 | 97 | UnableToFindPackageProvidingCommand, | 99 | UnableToFindPackageProvidingCommand, |
519 | 98 | ) | 100 | ) |
520 | 99 | 101 | ||
522 | 100 | from linaro_media_create.tests.fixtures import ( | 102 | from linaro_image_tools.media_create.tests.fixtures import ( |
523 | 101 | CreateTempDirFixture, | 103 | CreateTempDirFixture, |
524 | 102 | CreateTarballFixture, | 104 | CreateTarballFixture, |
525 | 103 | MockCmdRunnerPopenFixture, | 105 | MockCmdRunnerPopenFixture, |
526 | @@ -231,7 +233,7 @@ | |||
527 | 231 | self.mock_all_boards_funcs() | 233 | self.mock_all_boards_funcs() |
528 | 232 | 234 | ||
529 | 233 | def mock_all_boards_funcs(self): | 235 | def mock_all_boards_funcs(self): |
531 | 234 | """Mock functions of linaro_media_create.boards with a call tracer.""" | 236 | """Mock functions of boards module with a call tracer.""" |
532 | 235 | 237 | ||
533 | 236 | def mock_func_creator(name): | 238 | def mock_func_creator(name): |
534 | 237 | return lambda *args, **kwargs: self.funcs_calls.append(name) | 239 | return lambda *args, **kwargs: self.funcs_calls.append(name) |
535 | @@ -240,7 +242,7 @@ | |||
536 | 240 | attr = getattr(boards, name) | 242 | attr = getattr(boards, name) |
537 | 241 | if type(attr) == types.FunctionType: | 243 | if type(attr) == types.FunctionType: |
538 | 242 | self.useFixture(MockSomethingFixture( | 244 | self.useFixture(MockSomethingFixture( |
540 | 243 | linaro_media_create.boards, name, | 245 | linaro_image_tools.media_create.boards, name, |
541 | 244 | mock_func_creator(name))) | 246 | mock_func_creator(name))) |
542 | 245 | 247 | ||
543 | 246 | def mock_set_appropriate_serial_tty(self, config): | 248 | def mock_set_appropriate_serial_tty(self, config): |
544 | @@ -1430,12 +1432,13 @@ | |||
545 | 1430 | # run_local_atexit_funcs() runs the atexit handlers in LIFO order, but | 1432 | # run_local_atexit_funcs() runs the atexit handlers in LIFO order, but |
546 | 1431 | # even though the first function called (raising_func) will raise | 1433 | # even though the first function called (raising_func) will raise |
547 | 1432 | # an exception, the second one will still be called after it. | 1434 | # an exception, the second one will still be called after it. |
549 | 1433 | linaro_media_create.hwpack.local_atexit = [ | 1435 | linaro_image_tools.media_create.hwpack.local_atexit = [ |
550 | 1434 | behaving_func, raising_func] | 1436 | behaving_func, raising_func] |
551 | 1435 | # run_local_atexit_funcs() also propagates the last exception raised | 1437 | # run_local_atexit_funcs() also propagates the last exception raised |
552 | 1436 | # by one of the functions. | 1438 | # by one of the functions. |
553 | 1437 | self.assertRaises( | 1439 | self.assertRaises( |
555 | 1438 | TestException, linaro_media_create.hwpack.run_local_atexit_funcs) | 1440 | TestException, |
556 | 1441 | linaro_image_tools.media_create.hwpack.run_local_atexit_funcs) | ||
557 | 1439 | self.assertEquals( | 1442 | self.assertEquals( |
558 | 1440 | ['raising_func', 'behaving_func'], self.call_order) | 1443 | ['raising_func', 'behaving_func'], self.call_order) |
559 | 1441 | 1444 | ||
560 | @@ -1452,10 +1455,10 @@ | |||
561 | 1452 | sys, 'stdout', open('/dev/null', 'w'))) | 1455 | sys, 'stdout', open('/dev/null', 'w'))) |
562 | 1453 | self.useFixture(MockCmdRunnerPopenFixture()) | 1456 | self.useFixture(MockCmdRunnerPopenFixture()) |
563 | 1454 | self.useFixture(MockSomethingFixture( | 1457 | self.useFixture(MockSomethingFixture( |
565 | 1455 | linaro_media_create.hwpack, 'install_hwpack', | 1458 | linaro_image_tools.media_create.hwpack, 'install_hwpack', |
566 | 1456 | mock_install_hwpack)) | 1459 | mock_install_hwpack)) |
567 | 1457 | self.useFixture(MockSomethingFixture( | 1460 | self.useFixture(MockSomethingFixture( |
569 | 1458 | linaro_media_create.hwpack, 'run_local_atexit_funcs', | 1461 | linaro_image_tools.media_create.hwpack, 'run_local_atexit_funcs', |
570 | 1459 | mock_run_local_atexit_functions)) | 1462 | mock_run_local_atexit_functions)) |
571 | 1460 | 1463 | ||
572 | 1461 | force_yes = True | 1464 | force_yes = True |
573 | @@ -1474,5 +1477,5 @@ | |||
574 | 1474 | # Ensure the list of cleanup functions gets cleared to make sure tests | 1477 | # Ensure the list of cleanup functions gets cleared to make sure tests |
575 | 1475 | # don't interfere with one another. | 1478 | # don't interfere with one another. |
576 | 1476 | def clear_atexits(): | 1479 | def clear_atexits(): |
578 | 1477 | linaro_media_create.hwpack.local_atexit = [] | 1480 | linaro_image_tools.media_create.hwpack.local_atexit = [] |
579 | 1478 | self.addCleanup(clear_atexits) | 1481 | self.addCleanup(clear_atexits) |
580 | 1479 | 1482 | ||
581 | === modified file 'linaro_image_tools/media_create/unpack_binary_tarball.py' | |||
582 | --- linaro_media_create/unpack_binary_tarball.py 2011-01-28 19:50:48 +0000 | |||
583 | +++ linaro_image_tools/media_create/unpack_binary_tarball.py 2011-03-23 22:28:34 +0000 | |||
584 | @@ -17,7 +17,7 @@ | |||
585 | 17 | # You should have received a copy of the GNU General Public License | 17 | # You should have received a copy of the GNU General Public License |
586 | 18 | # along with Linaro Image Tools. If not, see <http://www.gnu.org/licenses/>. | 18 | # along with Linaro Image Tools. If not, see <http://www.gnu.org/licenses/>. |
587 | 19 | 19 | ||
589 | 20 | from linaro_media_create import cmd_runner | 20 | from linaro_image_tools.media_create import cmd_runner |
590 | 21 | 21 | ||
591 | 22 | 22 | ||
592 | 23 | def unpack_binary_tarball(tarball, unpack_dir, as_root=True): | 23 | def unpack_binary_tarball(tarball, unpack_dir, as_root=True): |
593 | 24 | 24 | ||
594 | === modified file 'linaro_image_tools/media_create/utils.py' | |||
595 | --- linaro_media_create/utils.py 2011-02-02 16:37:15 +0000 | |||
596 | +++ linaro_image_tools/media_create/utils.py 2011-03-23 22:28:34 +0000 | |||
597 | @@ -25,7 +25,7 @@ | |||
598 | 25 | except ImportError: | 25 | except ImportError: |
599 | 26 | CommandNotFound = None | 26 | CommandNotFound = None |
600 | 27 | 27 | ||
602 | 28 | from linaro_media_create import cmd_runner | 28 | from linaro_image_tools.media_create import cmd_runner |
603 | 29 | 29 | ||
604 | 30 | 30 | ||
605 | 31 | def install_package_providing(command): | 31 | def install_package_providing(command): |
606 | 32 | 32 | ||
607 | === renamed directory 'tests' => 'linaro_image_tools/tests' | |||
608 | === modified file 'linaro_image_tools/tests/__init__.py' | |||
609 | --- tests/__init__.py 2011-01-11 21:26:54 +0000 | |||
610 | +++ linaro_image_tools/tests/__init__.py 2011-03-23 22:28:34 +0000 | |||
611 | @@ -1,5 +1,7 @@ | |||
614 | 1 | from hwpack.tests import test_suite as hwpack_suite | 1 | from linaro_image_tools.hwpack.tests import test_suite as hwpack_suite |
615 | 2 | from linaro_media_create.tests import test_suite as media_create_suite | 2 | from linaro_image_tools.media_create.tests import ( |
616 | 3 | test_suite as media_create_suite, | ||
617 | 4 | ) | ||
618 | 3 | 5 | ||
619 | 4 | 6 | ||
620 | 5 | def test_suite(): | 7 | def test_suite(): |
621 | 6 | 8 | ||
622 | === modified file 'linaro_image_tools/tests/integration.txt' | |||
623 | --- tests/integration.txt 2011-01-28 12:21:07 +0000 | |||
624 | +++ linaro_image_tools/tests/integration.txt 2011-03-23 22:28:34 +0000 | |||
625 | @@ -4,13 +4,13 @@ | |||
626 | 4 | 4 | ||
627 | 5 | # This should print nothing to stdout but will unpack the given binary | 5 | # This should print nothing to stdout but will unpack the given binary |
628 | 6 | # tarball under the given directory. | 6 | # tarball under the given directory. |
630 | 7 | >>> from linaro_media_create.unpack_binary_tarball import unpack_binary_tarball | 7 | >>> from linaro_image_tools.media_create.unpack_binary_tarball import unpack_binary_tarball |
631 | 8 | >>> unpack_binary_tarball(<path-to-binary-tarball>, <dir-to-unpack>) | 8 | >>> unpack_binary_tarball(<path-to-binary-tarball>, <dir-to-unpack>) |
632 | 9 | 9 | ||
633 | 10 | # Partition (for real!) /dev/sdb for a beagle board and return the devices | 10 | # Partition (for real!) /dev/sdb for a beagle board and return the devices |
634 | 11 | # for the boot and root partitions. | 11 | # for the boot and root partitions. |
637 | 12 | >>> from linaro_media_create.partitions import Media, setup_partitions | 12 | >>> from linaro_image_tools.media_create.partitions import Media, setup_partitions |
638 | 13 | >>> from linaro_media_create.boards import board_configs | 13 | >>> from linaro_image_tools.media_create.boards import board_configs |
639 | 14 | >>> setup_partitions( | 14 | >>> setup_partitions( |
640 | 15 | ... board_configs['beagle'], Media('/dev/sdb'), None, 'boot', | 15 | ... board_configs['beagle'], Media('/dev/sdb'), None, 'boot', |
641 | 16 | ... 'root', 'ext3', True, True, True) | 16 | ... 'root', 'ext3', True, True, True) |
This looks great. Thanks a lot for working on it, Loïc!