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 | [DEFAULT] |
6 | test_command=python -m subunit.run $IDLIST |
7 | -test_id_list_default=tests.test_suite |
8 | +test_id_list_default=linaro_image_tools.tests.test_suite |
9 | |
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 | Maintainer: Linaro Infrastructure team <linaro-dev@linaro.org> |
15 | Source: https://launchpad.net/linaro-image-tools |
16 | |
17 | -Files: linaro-hwpack-create linaro-hwpack-install hwpack/* |
18 | -Copyright: 2010, 2011 Linaro Limited |
19 | +Files: linaro-hwpack-create linaro-hwpack-install linaro_image_tools/hwpack/* |
20 | +Copyright: 2010, 2011 Linaro Limited |
21 | License: GPL-2+ |
22 | |
23 | -Files: linaro-media-create linaro_media_create/* |
24 | -Copyright: 2010, 2011 Linaro Limited |
25 | +Files: linaro-media-create linaro_image_tools/media_create/* |
26 | +Copyright: 2010, 2011 Linaro Limited |
27 | License: GPL-3+ |
28 | |
29 | |
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 | import logging |
35 | import sys |
36 | |
37 | -from hwpack.builder import ConfigFileMissing, HardwarePackBuilder |
38 | +from linaro_image_tools.hwpack.builder import ( |
39 | + ConfigFileMissing, HardwarePackBuilder) |
40 | |
41 | |
42 | if __name__ == '__main__': |
43 | |
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 | import sys |
49 | import tempfile |
50 | |
51 | -from linaro_media_create.boards import ( |
52 | - board_configs, |
53 | - ) |
54 | -from linaro_media_create.check_device import ( |
55 | +from linaro_image_tools.media_create.boards import board_configs |
56 | +from linaro_image_tools.media_create.check_device import ( |
57 | confirm_device_selection_and_ensure_it_is_ready) |
58 | -from linaro_media_create.hwpack import install_hwpacks |
59 | -from linaro_media_create.partitions import ( |
60 | +from linaro_image_tools.media_create.hwpack import install_hwpacks |
61 | +from linaro_image_tools.media_create.partitions import ( |
62 | Media, |
63 | setup_partitions, |
64 | get_uuid, |
65 | ) |
66 | -from linaro_media_create.populate_boot import populate_boot |
67 | -from linaro_media_create.rootfs import populate_rootfs |
68 | -from linaro_media_create.unpack_binary_tarball import unpack_binary_tarball |
69 | -from linaro_media_create.utils import ( |
70 | +from linaro_image_tools.media_create.populate_boot import populate_boot |
71 | +from linaro_image_tools.media_create.rootfs import populate_rootfs |
72 | +from linaro_image_tools.media_create.unpack_binary_tarball import ( |
73 | + unpack_binary_tarball, |
74 | + ) |
75 | +from linaro_image_tools.media_create.utils import ( |
76 | ensure_command, |
77 | is_arm_host, |
78 | ) |
79 | -from linaro_media_create import ( |
80 | +from linaro_image_tools.media_create import ( |
81 | cmd_runner, |
82 | get_args_parser |
83 | ) |
84 | |
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 | import logging |
93 | import errno |
94 | |
95 | -from hwpack.config import Config |
96 | -from hwpack.hardwarepack import HardwarePack, Metadata |
97 | -from hwpack.packages import ( |
98 | +from linaro_image_tools.hwpack.config import Config |
99 | +from linaro_image_tools.hwpack.hardwarepack import HardwarePack, Metadata |
100 | +from linaro_image_tools.hwpack.packages import ( |
101 | FetchedPackage, |
102 | LocalArchiveMaker, |
103 | PackageFetcher, |
104 | |
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 | |
110 | import time |
111 | |
112 | -from hwpack.better_tarfile import writeable_tarfile |
113 | -from hwpack.packages import ( |
114 | +from linaro_image_tools.hwpack.better_tarfile import writeable_tarfile |
115 | +from linaro_image_tools.hwpack.packages import ( |
116 | FetchedPackage, |
117 | get_packages_file, |
118 | PackageMaker, |
119 | |
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 | from testtools import TestCase |
125 | from testtools.matchers import Annotate, Equals, Matcher, Mismatch |
126 | |
127 | -from hwpack.better_tarfile import writeable_tarfile |
128 | -from hwpack.tarfile_matchers import TarfileHasFile |
129 | -from hwpack.packages import get_packages_file, FetchedPackage |
130 | +from linaro_image_tools.hwpack.better_tarfile import writeable_tarfile |
131 | +from linaro_image_tools.hwpack.tarfile_matchers import TarfileHasFile |
132 | +from linaro_image_tools.hwpack.packages import ( |
133 | + get_packages_file, |
134 | + FetchedPackage, |
135 | + ) |
136 | |
137 | |
138 | @contextmanager |
139 | |
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 | |
145 | def test_suite(): |
146 | module_names = [ |
147 | - 'hwpack.tests.test_better_tarfile', |
148 | - 'hwpack.tests.test_builder', |
149 | - 'hwpack.tests.test_config', |
150 | - 'hwpack.tests.test_hardwarepack', |
151 | - 'hwpack.tests.test_packages', |
152 | - 'hwpack.tests.test_script', |
153 | - 'hwpack.tests.test_tarfile_matchers', |
154 | - 'hwpack.tests.test_testing', |
155 | + 'linaro_image_tools.hwpack.tests.test_better_tarfile', |
156 | + 'linaro_image_tools.hwpack.tests.test_builder', |
157 | + 'linaro_image_tools.hwpack.tests.test_config', |
158 | + 'linaro_image_tools.hwpack.tests.test_hardwarepack', |
159 | + 'linaro_image_tools.hwpack.tests.test_packages', |
160 | + 'linaro_image_tools.hwpack.tests.test_script', |
161 | + 'linaro_image_tools.hwpack.tests.test_tarfile_matchers', |
162 | + 'linaro_image_tools.hwpack.tests.test_testing', |
163 | ] |
164 | loader = unittest.TestLoader() |
165 | suite = loader.loadTestsFromNames(module_names) |
166 | |
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 | |
172 | from testtools import TestCase |
173 | |
174 | -from hwpack.better_tarfile import writeable_tarfile |
175 | +from linaro_image_tools.hwpack.better_tarfile import writeable_tarfile |
176 | |
177 | |
178 | @contextmanager |
179 | |
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 | from testtools import TestCase |
185 | from testtools.matchers import Equals |
186 | |
187 | -from hwpack.builder import ( |
188 | +from linaro_image_tools.hwpack.builder import ( |
189 | ConfigFileMissing, |
190 | HardwarePackBuilder, |
191 | logger as builder_logger, |
192 | ) |
193 | -from hwpack.config import HwpackConfigError |
194 | -from hwpack.hardwarepack import Metadata |
195 | -from hwpack.packages import ( |
196 | +from linaro_image_tools.hwpack.config import HwpackConfigError |
197 | +from linaro_image_tools.hwpack.hardwarepack import Metadata |
198 | +from linaro_image_tools.hwpack.packages import ( |
199 | FetchedPackage, |
200 | PackageMaker, |
201 | ) |
202 | -from hwpack.tarfile_matchers import TarfileHasFile |
203 | -from hwpack.testing import ( |
204 | +from linaro_image_tools.hwpack.tarfile_matchers import TarfileHasFile |
205 | +from linaro_image_tools.hwpack.testing import ( |
206 | AppendingHandler, |
207 | AptSourceFixture, |
208 | ChdirToTempdirFixture, |
209 | |
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 | |
215 | from testtools import TestCase |
216 | |
217 | -from hwpack.config import Config, HwpackConfigError |
218 | +from linaro_image_tools.hwpack.config import Config, HwpackConfigError |
219 | |
220 | |
221 | class ConfigTests(TestCase): |
222 | |
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 | from testtools import TestCase |
228 | from testtools.matchers import Equals |
229 | |
230 | -from hwpack.hardwarepack import HardwarePack, Metadata |
231 | -from hwpack.packages import get_packages_file |
232 | -from hwpack.testing import ( |
233 | +from linaro_image_tools.hwpack.hardwarepack import HardwarePack, Metadata |
234 | +from linaro_image_tools.hwpack.packages import get_packages_file |
235 | +from linaro_image_tools.hwpack.testing import ( |
236 | DummyFetchedPackage, |
237 | HardwarePackHasFile, |
238 | MatchesAsPackagesFile, |
239 | |
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 | from testtools import TestCase |
245 | from testtools.matchers import Equals |
246 | |
247 | -from hwpack.packages import ( |
248 | +from linaro_image_tools.hwpack.packages import ( |
249 | DependencyNotSatisfied, |
250 | DummyProgress, |
251 | FetchedPackage, |
252 | @@ -45,7 +45,7 @@ |
253 | stringify_relationship, |
254 | TemporaryDirectoryManager, |
255 | ) |
256 | -from hwpack.testing import ( |
257 | +from linaro_image_tools.hwpack.testing import ( |
258 | AptSourceFixture, |
259 | ContextManagerFixture, |
260 | DummyFetchedPackage, |
261 | |
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 | import os |
267 | import subprocess |
268 | |
269 | -from hwpack.hardwarepack import Metadata |
270 | -from hwpack.testing import ( |
271 | +from linaro_image_tools.hwpack.hardwarepack import Metadata |
272 | +from linaro_image_tools.hwpack.testing import ( |
273 | AptSourceFixture, |
274 | ChdirToTempdirFixture, |
275 | ConfigFileFixture, |
276 | @@ -45,7 +45,7 @@ |
277 | script_name = "linaro-hwpack-create" |
278 | this_path = os.path.abspath(__file__) |
279 | parent_path = this_path |
280 | - for i in range(3): |
281 | + for i in range(4): |
282 | parent_path = os.path.dirname(parent_path) |
283 | possible_paths = [ |
284 | os.path.join(parent_path, script_name), |
285 | |
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 | |
291 | from testtools import TestCase |
292 | |
293 | -from hwpack.tarfile_matchers import ( |
294 | +from linaro_image_tools.hwpack.tarfile_matchers import ( |
295 | TarfileHasFile, |
296 | TarfileMissingPathMismatch, |
297 | TarfileWrongValueMismatch, |
298 | ) |
299 | -from hwpack.testing import test_tarfile |
300 | +from linaro_image_tools.hwpack.testing import test_tarfile |
301 | |
302 | |
303 | class TarfileMissingPathMismatchTests(TestCase): |
304 | |
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 | Mismatch, |
310 | NotEquals, |
311 | ) |
312 | -from hwpack.testing import ( |
313 | +from linaro_image_tools.hwpack.testing import ( |
314 | DummyFetchedPackage, |
315 | EachOf, |
316 | MatchesAsPackagesFile, |
317 | @@ -41,7 +41,7 @@ |
318 | MatchesSetwise, |
319 | parse_packages_file_content, |
320 | ) |
321 | -from hwpack.packages import ( |
322 | +from linaro_image_tools.hwpack.packages import ( |
323 | get_packages_file, |
324 | ) |
325 | |
326 | |
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 | |
333 | import argparse |
334 | |
335 | -from linaro_media_create.boards import board_configs |
336 | +from linaro_image_tools.media_create.boards import board_configs |
337 | |
338 | |
339 | KNOWN_BOARDS = board_configs.keys() |
340 | |
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 | import struct |
346 | from binascii import crc32 |
347 | |
348 | -from linaro_media_create import cmd_runner |
349 | -from linaro_media_create.partitions import SECTOR_SIZE |
350 | +from linaro_image_tools.media_create import cmd_runner |
351 | +from linaro_image_tools.media_create.partitions import SECTOR_SIZE |
352 | |
353 | # Notes: |
354 | # * since we align partitions on 4 MiB by default, geometry is currently 128 |
355 | |
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 | |
361 | import dbus |
362 | |
363 | -from linaro_media_create import partitions |
364 | +from linaro_image_tools.media_create import partitions |
365 | |
366 | |
367 | def _get_system_bus_and_udisks_iface(): |
368 | |
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 | import os |
374 | import sys |
375 | |
376 | -from linaro_media_create import cmd_runner |
377 | -from linaro_media_create.utils import ( |
378 | +from linaro_image_tools.media_create import cmd_runner |
379 | +from linaro_image_tools.media_create.utils import ( |
380 | is_arm_host, |
381 | find_command, |
382 | ) |
383 | |
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 | PARTITION_NORMAL, |
389 | ) |
390 | |
391 | -from linaro_media_create import cmd_runner |
392 | +from linaro_image_tools.media_create import cmd_runner |
393 | |
394 | |
395 | HEADS = 128 |
396 | |
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 | |
402 | import os |
403 | |
404 | -from linaro_media_create import cmd_runner |
405 | +from linaro_image_tools.media_create import cmd_runner |
406 | |
407 | |
408 | def populate_boot(board_config, chroot_dir, rootfs_uuid, boot_partition, |
409 | |
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 | import os |
415 | import tempfile |
416 | |
417 | -from linaro_media_create import cmd_runner |
418 | +from linaro_image_tools.media_create import cmd_runner |
419 | |
420 | |
421 | def populate_rootfs(content_dir, root_disk, partition, rootfs_type, |
422 | |
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 | import unittest |
428 | |
429 | def test_suite(): |
430 | - module_names = ['linaro_media_create.tests.test_media_create', |
431 | + module_names = ['linaro_image_tools.media_create.tests.test_media_create', |
432 | ] |
433 | loader = unittest.TestLoader() |
434 | suite = loader.loadTestsFromNames(module_names) |
435 | |
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 | import subprocess |
441 | import tempfile |
442 | |
443 | -from linaro_media_create import partitions |
444 | -from linaro_media_create import cmd_runner |
445 | +from linaro_image_tools.media_create import partitions |
446 | +from linaro_image_tools.media_create import cmd_runner |
447 | |
448 | |
449 | class CreateTempDirFixture(object): |
450 | |
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 | |
456 | from testtools import TestCase |
457 | |
458 | -from hwpack.testing import TestCaseWithFixtures |
459 | +from linaro_image_tools.hwpack.testing import TestCaseWithFixtures |
460 | |
461 | -from linaro_media_create import ( |
462 | +from linaro_image_tools.media_create import ( |
463 | check_device, |
464 | cmd_runner, |
465 | boards, |
466 | @@ -41,8 +41,8 @@ |
467 | rootfs, |
468 | utils, |
469 | ) |
470 | -import linaro_media_create |
471 | -from linaro_media_create.boards import ( |
472 | +import linaro_image_tools.media_create |
473 | +from linaro_image_tools.media_create.boards import ( |
474 | LOADER_MIN_SIZE_S, |
475 | SECTOR_SIZE, |
476 | align_up, |
477 | @@ -58,7 +58,7 @@ |
478 | _get_mlo_file, |
479 | _run_mkimage, |
480 | ) |
481 | -from linaro_media_create.hwpack import ( |
482 | +from linaro_image_tools.media_create.hwpack import ( |
483 | copy_file, |
484 | install_hwpack, |
485 | install_hwpacks, |
486 | @@ -66,7 +66,7 @@ |
487 | run_local_atexit_funcs, |
488 | temporarily_overwrite_file_on_dir, |
489 | ) |
490 | -from linaro_media_create.partitions import ( |
491 | +from linaro_image_tools.media_create.partitions import ( |
492 | HEADS, |
493 | SECTORS, |
494 | calculate_partition_size_and_offset, |
495 | @@ -81,23 +81,25 @@ |
496 | get_uuid, |
497 | _parse_blkid_output, |
498 | ) |
499 | -from linaro_media_create.populate_boot import populate_boot |
500 | -from linaro_media_create.rootfs import ( |
501 | +from linaro_image_tools.media_create.populate_boot import populate_boot |
502 | +from linaro_image_tools.media_create.rootfs import ( |
503 | create_flash_kernel_config, |
504 | has_space_left_for_swap, |
505 | move_contents, |
506 | populate_rootfs, |
507 | write_data_to_protected_file, |
508 | ) |
509 | -from linaro_media_create.unpack_binary_tarball import unpack_binary_tarball |
510 | -from linaro_media_create.utils import ( |
511 | +from linaro_image_tools.media_create.unpack_binary_tarball import ( |
512 | + unpack_binary_tarball, |
513 | + ) |
514 | +from linaro_image_tools.media_create.utils import ( |
515 | ensure_command, |
516 | find_command, |
517 | install_package_providing, |
518 | UnableToFindPackageProvidingCommand, |
519 | ) |
520 | |
521 | -from linaro_media_create.tests.fixtures import ( |
522 | +from linaro_image_tools.media_create.tests.fixtures import ( |
523 | CreateTempDirFixture, |
524 | CreateTarballFixture, |
525 | MockCmdRunnerPopenFixture, |
526 | @@ -231,7 +233,7 @@ |
527 | self.mock_all_boards_funcs() |
528 | |
529 | def mock_all_boards_funcs(self): |
530 | - """Mock functions of linaro_media_create.boards with a call tracer.""" |
531 | + """Mock functions of boards module with a call tracer.""" |
532 | |
533 | def mock_func_creator(name): |
534 | return lambda *args, **kwargs: self.funcs_calls.append(name) |
535 | @@ -240,7 +242,7 @@ |
536 | attr = getattr(boards, name) |
537 | if type(attr) == types.FunctionType: |
538 | self.useFixture(MockSomethingFixture( |
539 | - linaro_media_create.boards, name, |
540 | + linaro_image_tools.media_create.boards, name, |
541 | mock_func_creator(name))) |
542 | |
543 | def mock_set_appropriate_serial_tty(self, config): |
544 | @@ -1430,12 +1432,13 @@ |
545 | # run_local_atexit_funcs() runs the atexit handlers in LIFO order, but |
546 | # even though the first function called (raising_func) will raise |
547 | # an exception, the second one will still be called after it. |
548 | - linaro_media_create.hwpack.local_atexit = [ |
549 | + linaro_image_tools.media_create.hwpack.local_atexit = [ |
550 | behaving_func, raising_func] |
551 | # run_local_atexit_funcs() also propagates the last exception raised |
552 | # by one of the functions. |
553 | self.assertRaises( |
554 | - TestException, linaro_media_create.hwpack.run_local_atexit_funcs) |
555 | + TestException, |
556 | + linaro_image_tools.media_create.hwpack.run_local_atexit_funcs) |
557 | self.assertEquals( |
558 | ['raising_func', 'behaving_func'], self.call_order) |
559 | |
560 | @@ -1452,10 +1455,10 @@ |
561 | sys, 'stdout', open('/dev/null', 'w'))) |
562 | self.useFixture(MockCmdRunnerPopenFixture()) |
563 | self.useFixture(MockSomethingFixture( |
564 | - linaro_media_create.hwpack, 'install_hwpack', |
565 | + linaro_image_tools.media_create.hwpack, 'install_hwpack', |
566 | mock_install_hwpack)) |
567 | self.useFixture(MockSomethingFixture( |
568 | - linaro_media_create.hwpack, 'run_local_atexit_funcs', |
569 | + linaro_image_tools.media_create.hwpack, 'run_local_atexit_funcs', |
570 | mock_run_local_atexit_functions)) |
571 | |
572 | force_yes = True |
573 | @@ -1474,5 +1477,5 @@ |
574 | # Ensure the list of cleanup functions gets cleared to make sure tests |
575 | # don't interfere with one another. |
576 | def clear_atexits(): |
577 | - linaro_media_create.hwpack.local_atexit = [] |
578 | + linaro_image_tools.media_create.hwpack.local_atexit = [] |
579 | self.addCleanup(clear_atexits) |
580 | |
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 | # You should have received a copy of the GNU General Public License |
586 | # along with Linaro Image Tools. If not, see <http://www.gnu.org/licenses/>. |
587 | |
588 | -from linaro_media_create import cmd_runner |
589 | +from linaro_image_tools.media_create import cmd_runner |
590 | |
591 | |
592 | def unpack_binary_tarball(tarball, unpack_dir, as_root=True): |
593 | |
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 | except ImportError: |
599 | CommandNotFound = None |
600 | |
601 | -from linaro_media_create import cmd_runner |
602 | +from linaro_image_tools.media_create import cmd_runner |
603 | |
604 | |
605 | def install_package_providing(command): |
606 | |
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 @@ |
612 | -from hwpack.tests import test_suite as hwpack_suite |
613 | -from linaro_media_create.tests import test_suite as media_create_suite |
614 | +from linaro_image_tools.hwpack.tests import test_suite as hwpack_suite |
615 | +from linaro_image_tools.media_create.tests import ( |
616 | + test_suite as media_create_suite, |
617 | + ) |
618 | |
619 | |
620 | def test_suite(): |
621 | |
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 | |
627 | # This should print nothing to stdout but will unpack the given binary |
628 | # tarball under the given directory. |
629 | - >>> from linaro_media_create.unpack_binary_tarball import unpack_binary_tarball |
630 | + >>> from linaro_image_tools.media_create.unpack_binary_tarball import unpack_binary_tarball |
631 | >>> unpack_binary_tarball(<path-to-binary-tarball>, <dir-to-unpack>) |
632 | |
633 | # Partition (for real!) /dev/sdb for a beagle board and return the devices |
634 | # for the boot and root partitions. |
635 | - >>> from linaro_media_create.partitions import Media, setup_partitions |
636 | - >>> from linaro_media_create.boards import board_configs |
637 | + >>> from linaro_image_tools.media_create.partitions import Media, setup_partitions |
638 | + >>> from linaro_image_tools.media_create.boards import board_configs |
639 | >>> setup_partitions( |
640 | ... board_configs['beagle'], Media('/dev/sdb'), None, 'boot', |
641 | ... 'root', 'ext3', True, True, True) |
This looks great. Thanks a lot for working on it, Loïc!