wutils.py
changeset 5917 aa8364846523
parent 4584 7f4ee7f84b19
child 5975 c85cb9b073a0
--- a/wutils.py	Mon Jan 18 10:00:46 2010 +0100
+++ b/wutils.py	Tue Jan 19 16:56:44 2010 +0100
@@ -121,16 +121,12 @@
             raise Utils.WafError("Options --command-template and --valgrind are conflicting")
         if not env['VALGRIND']:
             raise Utils.WafError("valgrind is not installed")
-        argv = [env['VALGRIND'], "--leak-check=full", "--error-exitcode=1"] + argv
+        argv = [env['VALGRIND'], "--leak-check=full", "--show-reachable=yes", "--error-exitcode=1"] + argv
         proc = subprocess.Popen(argv, env=proc_env, cwd=cwd, stderr=subprocess.PIPE)
-        reg = re.compile ('definitely lost: ([^ ]+) bytes')
         error = False
         for line in proc.stderr:
             sys.stderr.write(line)
-            result = reg.search(line)
-            if result is None:
-                continue
-            if result.group(1) != "0":
+            if "== LEAK SUMMARY" in line:
                 error = True
         retval = proc.wait()
         if retval == 0 and error: