Merge lp:~fgiff/linaro-android-bot-review/870803 into lp:linaro-android-bot-review

Proposed by Frans Gifford
Status: Merged
Approved by: Frans Gifford
Approved revision: 39
Merged at revision: 75
Proposed branch: lp:~fgiff/linaro-android-bot-review/870803
Merge into: lp:linaro-android-bot-review
Diff against target: 92 lines (+34/-27)
2 files modified
androidbotreview.py (+16/-12)
tests/testandroidbotreview.py (+18/-15)
To merge this branch: bzr merge lp:~fgiff/linaro-android-bot-review/870803
Reviewer Review Type Date Requested Status
Frans Gifford (community) Approve
Review via email: mp+79533@code.launchpad.net

Description of the change

Added fix for the following bugs, though it appears to be obsolete due to the newer POST_CHECKOUT_HOOK, so I commented it out and suggest inserting it anyway for reference.
#870801 Bot can't tell if given change applicable to current build at all
#870803 Bot doesn't understand difference between project and repo checkout path

To post a comment you must log in.
39. By Frans Gifford

Catch-up merge.

Revision history for this message
Frans Gifford (fgiff) wrote :

Doesn't affect anything in deployment.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'androidbotreview.py'
--- androidbotreview.py 2011-10-17 21:14:56 +0000
+++ androidbotreview.py 2011-10-18 09:19:25 +0000
@@ -105,7 +105,7 @@
105 extra_config += "CONFIGURATION='%s && %s && %s && %s && %s && %s && %s'" % (105 extra_config += "CONFIGURATION='%s && %s && %s && %s && %s && %s && %s'" % (
106 "cd .repo/manifests",106 "cd .repo/manifests",
107 "git reset --hard",107 "git reset --hard",
108 "git fetch http://%s/p/%s %s" % (108 "git fetch git://%s/%s %s" % (
109 self.gc.review_host,109 self.gc.review_host,
110 rev["project"],110 rev["project"],
111 rev["currentPatchSet"]["ref"]),111 rev["currentPatchSet"]["ref"]),
@@ -114,17 +114,21 @@
114 "repo init -u .repo/manifests -b build",114 "repo init -u .repo/manifests -b build",
115 "repo sync -ld")115 "repo sync -ld")
116 else:116 else:
117 # repo download doesn't work from android-build. Use a workaround.117 # If the change is in a git in our manifest, then fetch it.
118 # It's probably something to do with the mirroring we do.118 # Otherwise do nothing.
119 #extra_config = "repo download %s %s/%s" % (119 # repo download doesn't work as the mirroring means that:
120 # rev["project"], 120 # * The project lines in the manifest are wrong.
121 # rev["number"],121 # * None of the remotes from the real manifest exist.
122 # rev["currentPatchSet"]["number"])122 # We use a workaround to pull from the right git.
123# extra_config += "CONFIGURATION='%s && %s && %s && %s'" % (123# extra_config += "CONFIGURATION='%s && %s && %s && %s && %s && %s && %s && %s'" % (
124# "cd %s" % (rev["project"]),124# "cp out/source-manifest.xml .repo/manifest.xml",
125# "git fetch http://%s/p/%s %s" % (self.gc.review_host,125# "if ! (repo list %s); then exit 0; fi" %(rev["project"]),
126# rev["project"],126# 'PROJ_DIR=`expr "\`repo list %s\`" : "\(^\w*\)"`' % (rev["project"]),
127# rev["currentPatchSet"]["ref"]),127# "cp .repo/mirror-manifest.xml .repo/manifest.xml",
128# "cd $PROJ_DIR",
129# "git fetch git://%s/%s %s" % (self.gc.review_host,
130# rev["project"],
131# rev["currentPatchSet"]["ref"]),
128# "git checkout FETCH_HEAD",132# "git checkout FETCH_HEAD",
129# "cd -")133# "cd -")
130 extra_config += 'POST_CHECKOUT_HOOK="apply-gerrit-change %s %s %s"' % (134 extra_config += 'POST_CHECKOUT_HOOK="apply-gerrit-change %s %s %s"' % (
131135
=== modified file 'tests/testandroidbotreview.py'
--- tests/testandroidbotreview.py 2011-09-30 08:31:25 +0000
+++ tests/testandroidbotreview.py 2011-10-18 09:19:25 +0000
@@ -45,24 +45,27 @@
4545
4646
47 def testGet_extra_config(self):47 def testGet_extra_config(self):
48 extra_config = self.i.get_extra_config({"project": "a",48 extra_config = self.i.get_extra_config({"project": "a1/a2",
49 "currentPatchSet": {"ref": "b"}})49 "currentPatchSet": {"ref": "b"}})
50 self.assertEquals("CONFIGURATION='%s && %s && %s && %s'" % (50 self.assert_(0 < extra_config.find(
51 "cd a",51 "CONFIGURATION='%s && %s && %s && %s'" % (
52 "git fetch http://%s/p/%s %s" % (self.i.gc.review_host, "a", "b"),52 "cd $(repo list | sed '/a1\/a2/ ! d; s/^\(\w*\).*/\1/')",
53 "git checkout FETCH_HEAD",53 "git fetch http://%s/p/%s %s" % (
54 "cd -"), extra_config)54 self.i.gc.review_host, "a1/a2", "b"),
55 "git checkout FETCH_HEAD",
56 "cd -")))
55 extra_config = self.i.get_extra_config({"project": "platform/manifest",57 extra_config = self.i.get_extra_config({"project": "platform/manifest",
56 "currentPatchSet": {"ref": "b"}})58 "currentPatchSet": {"ref": "b"}})
57 self.assertEquals("CONFIGURATION='%s && %s && %s && %s && %s && %s && %s'" % (59 self.assert_(0 < extra_config.find(
58 "cd .repo/manifests",60 "CONFIGURATION='%s && %s && %s && %s && %s && %s && %s'" % (
59 "git reset --hard",61 "cd .repo/manifests",
60 "git fetch http://%s/p/%s %s" % (self.i.gc.review_host, 62 "git reset --hard",
61 "platform/manifest", "b"),63 "git fetch http://%s/p/%s %s" % (self.i.gc.review_host,
62 "git checkout -b build FETCH_HEAD",64 "platform/manifest", "b"),
63 "cd -",65 "git checkout -b build FETCH_HEAD",
64 "repo init -u .repo/manifests -b build",66 "cd -",
65 "repo sync -ld"), extra_config)67 "repo init -u .repo/manifests -b build",
68 "repo sync -ld")))
6669
6770
68 def xtestBuild_jobs(self):71 def xtestBuild_jobs(self):

Subscribers

People subscribed via source and target branches

to all changes: