Title: [95363] trunk/Tools
- Revision
- 95363
- Author
- [email protected]
- Date
- 2011-09-16 21:15:13 -0700 (Fri, 16 Sep 2011)
Log Message
update-webkit-chromium should retry the gclient call if it fails once
https://bugs.webkit.org/show_bug.cgi?id=68252
Patch by Tom Zakrajsek <[email protected]> on 2011-09-16
Reviewed by Adam Barth.
* Scripts/update-webkit-chromium:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (95362 => 95363)
--- trunk/Tools/ChangeLog 2011-09-17 04:01:31 UTC (rev 95362)
+++ trunk/Tools/ChangeLog 2011-09-17 04:15:13 UTC (rev 95363)
@@ -1,3 +1,12 @@
+2011-09-16 Tom Zakrajsek <[email protected]>
+
+ update-webkit-chromium should retry the gclient call if it fails once
+ https://bugs.webkit.org/show_bug.cgi?id=68252
+
+ Reviewed by Adam Barth.
+
+ * Scripts/update-webkit-chromium:
+
2011-09-16 Rob Buis <[email protected]>
Add Eli's rim address and change the nick.
Modified: trunk/Tools/Scripts/update-webkit-chromium (95362 => 95363)
--- trunk/Tools/Scripts/update-webkit-chromium 2011-09-17 04:01:31 UTC (rev 95362)
+++ trunk/Tools/Scripts/update-webkit-chromium 2011-09-17 04:15:13 UTC (rev 95363)
@@ -77,4 +77,19 @@
push @gclientArgs, "--force" if $force;
push @gclientArgs, "--delete_unversioned_trees" if $force;
push @gclientArgs, "--deps=unix,android" if isChromiumAndroid();
-system(@gclientArgs) == 0 or die $!;
+
+my $cmd = join(" ",@gclientArgs);
+my $max_attempts = 3;
+my $rc = -1;
+
+# The following will call glient up to $max_attempts times before
+# it gives up and fails. We need this because glcient can fail
+# for several reasons, some of which are transient (flakiness).
+
+for (1 .. $max_attempts) {
+ $rc = system($cmd);
+ print "Re-trying '" . $cmd . "'\n" if $rc != 0;
+ last if $rc == 0;
+}
+
+die "Error: '$cmd' failed $max_attempts tries and returned " . $rc if ($rc);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes