[asterisk-commits] mjordan: testsuite/asterisk/trunk r2190 - /asterisk/trunk/runtests.py

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 12 13:04:34 CDT 2011


Author: mjordan
Date: Mon Sep 12 13:04:31 2011
New Revision: 2190

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=2190
Log:
Made Asterisk instance static on class Dependency.  Previously, a 'fake' ast directory was being made for each test that had an asterisk module dependency; with this, only one 'fake' ast directory is made as a result of the module dependency resolution.

Modified:
    asterisk/trunk/runtests.py

Modified: asterisk/trunk/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/runtests.py?view=diff&rev=2190&r1=2189&r2=2190
==============================================================================
--- asterisk/trunk/runtests.py (original)
+++ asterisk/trunk/runtests.py Mon Sep 12 13:04:31 2011
@@ -28,6 +28,9 @@
 
 
 class Dependency:
+
+    __ast = Asterisk()
+
     def __init__(self, dep):
         self.name = ""
         self.version = ""
@@ -120,11 +123,10 @@
         return False
 
     def __find_asterisk_module(self, name):
-        ast = Asterisk()
-        if "astmoddir" not in ast.directories:
+        if "astmoddir" not in Dependency.__ast.directories:
             return False
 
-        module = "%s/%s.so" % (ast.directories["astmoddir"], name)
+        module = "%s/%s.so" % (Dependency.__ast.directories["astmoddir"], name)
         if os.path.exists(module):
             return True
 




More information about the asterisk-commits mailing list