Merge lp:~fboudra/linaro-license-protection/create-latest-symlink-for-prebuilt-job-type into lp:~linaro-automation/linaro-license-protection/trunk

Proposed by Fathi Boudra
Status: Merged
Approved by: James Tunnicliffe
Approved revision: 154
Merged at revision: 154
Proposed branch: lp:~fboudra/linaro-license-protection/create-latest-symlink-for-prebuilt-job-type
Merge into: lp:~linaro-automation/linaro-license-protection/trunk
Diff against target: 30 lines (+8/-2)
1 file modified
scripts/publish_to_snapshots.py (+8/-2)
To merge this branch: bzr merge lp:~fboudra/linaro-license-protection/create-latest-symlink-for-prebuilt-job-type
Reviewer Review Type Date Requested Status
James Tunnicliffe (community) Approve
Review via email: mp+141576@code.launchpad.net

Description of the change

Create latest symlink for prebuilt job type

To post a comment you must log in.
Revision history for this message
James Tunnicliffe (dooferlad) wrote :

Thanks for this. Looks OK, but a test would be nice (tests/test_publish_to_snapshots.py)

review: Needs Fixing
Revision history for this message
Fathi Boudra (fboudra) wrote :

it's already tested in the existing tests

Revision history for this message
James Tunnicliffe (dooferlad) wrote :

Ah, OK then. If it wasn't tested before (clearly no tests have changed and I assume they still pass), then lets get this merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'scripts/publish_to_snapshots.py'
--- scripts/publish_to_snapshots.py 2012-12-05 14:35:12 +0000
+++ scripts/publish_to_snapshots.py 2013-01-02 00:01:22 +0000
@@ -208,7 +208,11 @@
208208
209 return build_dir_path, target_dir_path209 return build_dir_path, target_dir_path
210210
211 def create_symlink(self, args, target_dir_path):211 def create_symlink(self, args, build_dir_path, target_dir_path):
212 if args.job_type == "prebuilt":
213 for root, dirs, files in os.walk(build_dir_path):
214 for dir in dirs:
215 target_dir_path = os.path.join(target_dir_path, dir)
212 symlink_path = os.path.dirname(target_dir_path)216 symlink_path = os.path.dirname(target_dir_path)
213 if args.job_type == "android":217 if args.job_type == "android":
214 symlink_path = os.path.join(symlink_path, "lastSuccessful")218 symlink_path = os.path.join(symlink_path, "lastSuccessful")
@@ -332,11 +336,13 @@
332 sanitize=args.staging)336 sanitize=args.staging)
333337
334 if (args.job_type == "android" or338 if (args.job_type == "android" or
339 args.job_type == "prebuilt" or
335 args.job_type == "ubuntu-hwpacks" or340 args.job_type == "ubuntu-hwpacks" or
336 args.job_type == "ubuntu-images" or341 args.job_type == "ubuntu-images" or
337 args.job_type == "ubuntu-restricted" or342 args.job_type == "ubuntu-restricted" or
338 args.job_type == "ubuntu-sysroots"):343 args.job_type == "ubuntu-sysroots"):
339 ret = self.create_symlink(args, target_dir_path)344 ret = self.create_symlink(
345 args, build_dir_path, target_dir_path)
340 if ret != PASS:346 if ret != PASS:
341 return ret347 return ret
342348

Subscribers

People subscribed via source and target branches