]> git.puffer.fish Git - mirror/frr.git/commitdiff
topogen: fix topogen memleak activation
authorRafael Zalamena <rzalamena@gmail.com>
Wed, 12 Jul 2017 16:03:04 +0000 (13:03 -0300)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 28 Nov 2018 01:22:11 +0000 (20:22 -0500)
When memleak_path is present in the configuration file it means that it is
activated.

tests/topotests/lib/topogen.py

index d2140b34ba0dbe6031687143671c6bdaf25a75e3..20f0eda39e08873bd0763106819e56200380e1e4 100644 (file)
@@ -322,7 +322,8 @@ class Topogen(object):
 
     def is_memleak_enabled(self):
         "Returns `True` if memory leak report is enable, otherwise `False`."
-        memleak_file = os.environ.get('TOPOTESTS_CHECK_MEMLEAK')
+        memleak_file = (os.environ.get('TOPOTESTS_CHECK_MEMLEAK') or
+                        self.config.get(self.CONFIG_SECTION, 'memleak_path'))
         if memleak_file is None:
             return False
         return True