Merge lp://qastaging/~dooferlad/linaro-image-tools/copy-files-support into lp://qastaging/linaro-image-tools/11.11
Proposed by
James Tunnicliffe
Status: | Merged |
---|---|
Merged at revision: | 557 |
Proposed branch: | lp://qastaging/~dooferlad/linaro-image-tools/copy-files-support |
Merge into: | lp://qastaging/linaro-image-tools/11.11 |
Diff against target: |
436 lines (+225/-48) 4 files modified
linaro_image_tools/hwpack/builder.py (+94/-43) linaro_image_tools/hwpack/hardwarepack.py (+3/-1) linaro_image_tools/hwpack/packages.py (+10/-1) linaro_image_tools/hwpack/tests/test_builder.py (+118/-3) |
To merge this branch: | bzr merge lp://qastaging/~dooferlad/linaro-image-tools/copy-files-support |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Sokolovsky | Approve | ||
Review via email: mp+122554@code.qastaging.launchpad.net |
Description of the change
Adding copy_files support to linaro-
To post a comment you must log in.
Line #359 and on is a bit cryptic - instead of using unobvious numeric indexes targetting at the unneeded for tests feature of being able to change "foo" and "bar" in one place, it would be better to use "foo" and "bar" literally as needed - the test would become more clear and actually easier to maintain and extend.
More importantly, this has a regression wrt to original test which I wrote - which check that even if we have 2 different packages with the same layout (i.e. files with the same names at the same paths, but with different content), then exactly the file from expected package is used. This actually hit me due to bug in file expand code, and of course, it may hit again.
With new implementation, the problem is in line 266, which writes the same mock content to files on the same package, so it's not possible to distinguish 2 such files from different packages. I suggest letting user pass the content explicitly, then it can be easily specified as:
package_files = { lib/u-boot/ omap4_panda/ u-boot. img", "mock uboot #1"), ("usr/share/ doc/u-boot- linaro- omap4-panda/ copyright" , "mock copyright #1")]
"foo": [("usr/
...
}