[asterisk-commits] russell: testsuite/asterisk/trunk r724 - /asterisk/trunk/runtests.py

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 16 10:20:59 CDT 2010


Author: russell
Date: Mon Aug 16 10:20:55 2010
New Revision: 724

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=724
Log:
Make failure due to misconfigured tests/tests.yaml more graceful.

Modified:
    asterisk/trunk/runtests.py

Modified: asterisk/trunk/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/runtests.py?view=diff&rev=724&r1=723&r2=724
==============================================================================
--- asterisk/trunk/runtests.py (original)
+++ asterisk/trunk/runtests.py Mon Aug 16 10:20:55 2010
@@ -127,6 +127,13 @@
         self.time = 0.0
         self.test_name = test_name
         self.ast_version = ast_version
+        self.config = None
+        self.summary = None
+        self.maxversion = None
+        self.maxversion_check = False
+        self.minversion = None
+        self.minversion_check = False
+        self.deps = []
 
         self.__parse_config()
         self.__check_deps(ast_version)
@@ -173,7 +180,6 @@
 
     def __process_properties(self):
         self.minversion = AsteriskVersion("1.4")
-        self.maxversion = None
         if "properties" not in self.config:
             return
         properties = self.config["properties"]
@@ -206,10 +212,18 @@
         self.config = yaml.load(f)
         f.close()
 
+        if not self.config:
+            print "ERROR: Failed to load configuration for test '%s'" % \
+                    self.test_name
+            return
+
         self.__process_testinfo()
         self.__process_properties()
 
     def __check_deps(self, ast_version):
+        if not self.config:
+            return
+
         self.deps = [
             Dependency(d)
                 for d in self.config["properties"].get("dependencies") or []




More information about the asterisk-commits mailing list