summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/run-leaks
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/run-leaks')
-rwxr-xr-xWebKitTools/Scripts/run-leaks9
1 files changed, 9 insertions, 0 deletions
diff --git a/WebKitTools/Scripts/run-leaks b/WebKitTools/Scripts/run-leaks
index d8f89d3..9dc58de 100755
--- a/WebKitTools/Scripts/run-leaks
+++ b/WebKitTools/Scripts/run-leaks
@@ -132,6 +132,15 @@ sub parseLeaksOutput(\@)
#
# We treat every line except for Process 00000: and Leak: as optional
+ # Newer versions of the leaks output have a header section at the top, with the first line describing the version of the output format.
+ # If we detect the new format is being used then we eat all of the header section so the output matches the format of older versions.
+ # FIXME: In the future we may wish to propagate this section through to our output.
+ if ($leaksOutput->[0] =~ /^leaks Report Version:/) {
+ while ($leaksOutput->[0] !~ /^Process /) {
+ shift @$leaksOutput;
+ }
+ }
+
my ($leakCount) = ($leaksOutput->[1] =~ /[[:blank:]]+([0-9]+)[[:blank:]]+leaks?/);
if (!defined($leakCount)) {
reportError("Could not parse leak count reported by leaks tool.");