dbus-test: only test for memleaks if we actually ran the test
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 9 Jun 2011 11:39:38 +0000 (12:39 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 8 Feb 2012 19:09:52 +0000 (19:09 +0000)
This reduces output spam if you're only running one part.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38285
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
dbus/dbus-test.c

index b2eeb72..e6687c4 100644 (file)
@@ -63,9 +63,9 @@ run_test (const char             *test_name,
       printf ("%s: running %s tests\n", "dbus-test", test_name);
       if (!test ())
        die (test_name);
-    }
 
-  check_memleaks ();
+      check_memleaks ();
+    }
 }
 
 static void
@@ -79,9 +79,9 @@ run_data_test (const char             *test_name,
       printf ("%s: running %s tests\n", "dbus-test", test_name);
       if (!test (test_data_dir))
        die (test_name);
-    }
 
-  check_memleaks ();
+      check_memleaks ();
+    }
 }
 
 #endif /* DBUS_BUILD_TESTS */