Title: [97437] trunk/Tools
- Revision
- 97437
- Author
- o...@chromium.org
- Date
- 2011-10-13 20:11:24 -0700 (Thu, 13 Oct 2011)
Log Message
Make filter-build-webkit exit 1 if the build fails.
https://bugs.webkit.org/show_bug.cgi?id=70080
Reviewed by Eric Seidel.
This only works if you redirect stderr to stdout, but it at least makes it possible.
This is useful if you want to run a followup command (e.g. run-webkit-tests) but
only if the build succeeds.
* Scripts/filter-build-webkit:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (97436 => 97437)
--- trunk/Tools/ChangeLog 2011-10-14 02:22:41 UTC (rev 97436)
+++ trunk/Tools/ChangeLog 2011-10-14 03:11:24 UTC (rev 97437)
@@ -1,3 +1,16 @@
+2011-10-13 Ojan Vafai <o...@chromium.org>
+
+ Make filter-build-webkit exit 1 if the build fails.
+ https://bugs.webkit.org/show_bug.cgi?id=70080
+
+ Reviewed by Eric Seidel.
+
+ This only works if you redirect stderr to stdout, but it at least makes it possible.
+ This is useful if you want to run a followup command (e.g. run-webkit-tests) but
+ only if the build succeeds.
+
+ * Scripts/filter-build-webkit:
+
2011-10-13 Dimitri Glazkov <dglaz...@chromium.org>
land-cowboy should at least check style.
Modified: trunk/Tools/Scripts/filter-build-webkit (97436 => 97437)
--- trunk/Tools/Scripts/filter-build-webkit 2011-10-14 02:22:41 UTC (rev 97436)
+++ trunk/Tools/Scripts/filter-build-webkit 2011-10-14 03:11:24 UTC (rev 97437)
@@ -118,6 +118,7 @@
print OUTPUT_HANDLE HTML_HEADER if ($outputFormat eq "html");
my $buildFinished;
+my $buildFailed = 0;
while (my $line = <>) {
print UNFILTERED_OUTPUT_HANDLE $line if $logUnfilteredOutput;
@@ -151,6 +152,10 @@
my ($command, $path) = ($1, basename($2));
printLine("$command $path", STYLE_PLAIN);
} else {
+ # This only gets hit if stderr is redirected to stdout.
+ if ($line =~ /\*\* BUILD FAILED \*\*/) {
+ $buildFailed = 1;
+ }
printLine($line, $buildFinished ? STYLE_SUCCESS : STYLE_ALERT);
}
}
@@ -160,7 +165,7 @@
close(OUTPUT_HANDLE);
close(UNFILTERED_OUTPUT_HANDLE) if ($logUnfilteredOutput);
-exit 0;
+exit $buildFailed;
sub printLine($$)
{
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes