Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Unified Diff: tools/gn/bin/roll_gn.py

Issue 1357713008: Fix race and error case in GN auto-roller script. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/bin/roll_gn.py
diff --git a/tools/gn/bin/roll_gn.py b/tools/gn/bin/roll_gn.py
index 59a240fd01dae073b7a7e885a2d11c789fe55cc7..6c29b0afbde0eddd85eeca8982a2986a1c5b9d32 100644
--- a/tools/gn/bin/roll_gn.py
+++ b/tools/gn/bin/roll_gn.py
@@ -181,7 +181,8 @@ class GNRoller(object):
def WaitForBuildToFinish(self):
print('Checking build')
results = self.CheckBuild()
- while any(r['state'] == 'pending' for r in results.values()):
+ while (len(results) or
+ any(r['state'] == 'pending' for r in results.values())):
print()
print('Sleeping for 30 seconds')
time.sleep(30)
@@ -213,7 +214,7 @@ class GNRoller(object):
try_job_results = patchset_data['try_job_results']
if not try_job_results:
print('No try jobs found on most recent patchset')
- return 1
+ return {}
results = {}
for job in try_job_results:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698