parse-malloc-history always exits 1, causing NRWT to fail
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jul 2011 00:29:20 +0000 (00:29 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Jul 2011 00:29:20 +0000 (00:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=64835

Reviewed by Adam Barth.

ORWT just never checked the return code. :)

* Scripts/parse-malloc-history:
(main):
* Scripts/webkitpy/layout_tests/port/mac.py:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@91323 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/parse-malloc-history
Tools/Scripts/webkitpy/layout_tests/port/mac.py

index 8025990..85a4305 100644 (file)
@@ -1,3 +1,16 @@
+2011-07-19  Eric Seidel  <eric@webkit.org>
+
+        parse-malloc-history always exits 1, causing NRWT to fail
+        https://bugs.webkit.org/show_bug.cgi?id=64835
+
+        Reviewed by Adam Barth.
+
+        ORWT just never checked the return code. :)
+
+        * Scripts/parse-malloc-history:
+        (main):
+        * Scripts/webkitpy/layout_tests/port/mac.py:
+
 2011-07-19  Kevin Ollivier  <kevino@theolliviers.com>
 
         [wx] Unreviewed build fix, don't add the debug prefix as 2.9 no longer uses one.
index d257f9f..375203f 100755 (executable)
@@ -163,6 +163,7 @@ sub main()
     }
 
     print "total: " . commify($byteCountTotalReported) . " bytes (" . commify($byteCountTotal - $byteCountTotalReported) . " bytes excluded).\n";
+    return 0;
 }
 
 exit(main());
index 7cc5f3b..55d2186 100644 (file)
@@ -109,7 +109,11 @@ class LeakDetector(object):
             '--merge-depth',
             merge_depth,
         ] + leak_files
-        parse_malloc_history_output = self._port._run_script("parse-malloc-history", args, include_configuration_arguments=False)
+        try:
+            parse_malloc_history_output = self._port._run_script("parse-malloc-history", args, include_configuration_arguments=False)
+        except ScriptError, e:
+            _log.warn("Failed to parse leaks output: %s" % e.message_with_output())
+            return
 
         unique_leak_count = len(re.findall(r'^(\d*)\scalls', parse_malloc_history_output))
         total_bytes = int(re.search(r'^total\:\s(.*)\s\(', parse_malloc_history_output).group(1))