Index: tools/gn/bin/roll_gn.py |
diff --git a/tools/gn/bin/roll_gn.py b/tools/gn/bin/roll_gn.py |
index b5c276ecc8ee5b6394d2d83b5513f49fdc45fc10..66c711a0b288287ae9b8ab16f266dc718b23fde5 100644 |
--- a/tools/gn/bin/roll_gn.py |
+++ b/tools/gn/bin/roll_gn.py |
@@ -179,6 +179,10 @@ class GNRoller(object): |
fp.write(new_deps) |
def WaitForBuildToFinish(self): |
+ ret = self.CheckoutBuildBranch() |
+ if ret: |
+ return ret |
+ |
print('Checking build') |
results = self.CheckBuild() |
while (len(results) < 3 or |
@@ -203,6 +207,16 @@ class GNRoller(object): |
return ret |
+ def CheckoutBuildBranch(self): |
+ ret, out, err = self.Call('git checkout build_gn_%s' % self.new_gn_version) |
+ if ret: |
+ print('Failed to check out build_gn_%s' % self.new_gn_version) |
+ if out: |
+ print(out) |
+ if err: |
+ print(err, file=sys.stderr) |
+ return ret |
+ |
def CheckBuild(self): |
_, out, _ = self.Call('git-cl issue') |
@@ -276,6 +290,10 @@ class GNRoller(object): |
return results |
def RollBuildtools(self): |
+ ret = self.CheckoutBuildBranch() |
+ if ret: |
+ return ret |
+ |
results = self.CheckBuild() |
if (len(results) < 3 or |
not all(r['state'] == 'success' for r in results.values())): |