[svn-commits] russell: branch pabelanger/sipp r1225 - in /asterisk/team/pabelanger/sipp: ./...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Dec 16 20:07:13 UTC 2010
Author: russell
Date: Thu Dec 16 14:07:09 2010
New Revision: 1225
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=1225
Log:
Check for features specifically instead of relying on the comparison to handle both version and features
Modified:
asterisk/team/pabelanger/sipp/lib/python/sipp/version.py
asterisk/team/pabelanger/sipp/runtests.py
Modified: asterisk/team/pabelanger/sipp/lib/python/sipp/version.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/sipp/lib/python/sipp/version.py?view=diff&rev=1225&r1=1224&r2=1225
==============================================================================
--- asterisk/team/pabelanger/sipp/lib/python/sipp/version.py (original)
+++ asterisk/team/pabelanger/sipp/lib/python/sipp/version.py Thu Dec 16 14:07:09 2010
@@ -78,27 +78,11 @@
res += int(self.major) * 100000
if self.minor is not None:
res += int(self.minor) * 1000
- if self.tls:
- res += 100
- if self.pcap:
- res += 100
return res
def __cmp__(self, other):
- res = cmp(int(self), int(other))
- if res > 0:
- if self.tls is False and other.tls is True:
- res = False
- elif self.pcap is False and other.pcap is True:
- res = False
- elif res < 1:
- if other.tls is False and self.tls is True:
- res = False
- elif other.pcap is False and self.pcap is True:
- res = False
-
- return res
+ return cmp(int(self), int(other))
def __ne__(self, other):
res = self.__cmp__(other)
@@ -126,12 +110,9 @@
def __parse_feature(self, value):
self.feature_str = value
- if value == "TLS":
+ if value.find("TLS") > -1:
self.tls = True
- elif value == "PCAP":
- self.pcap = True
- elif value == "TLS-PCAP":
- self.tls = True
+ if value.find("PCAP") > -1:
self.pcap = True
class SIPpVersionTests(unittest.TestCase):
@@ -305,7 +286,7 @@
def test_cmp20(self):
v1 = SIPpVersion("v3.1", "PCAP")
v2 = SIPpVersion("v3.0", "TLS")
- self.assertFalse(v1 > v2)
+ self.assertTrue(v1 > v2)
def test_cmp21(self):
v1 = SIPpVersion("v3.2", "TLS-PCAP")
Modified: asterisk/team/pabelanger/sipp/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/sipp/runtests.py?view=diff&rev=1225&r1=1224&r2=1225
==============================================================================
--- asterisk/team/pabelanger/sipp/runtests.py (original)
+++ asterisk/team/pabelanger/sipp/runtests.py Thu Dec 16 14:07:09 2010
@@ -23,8 +23,10 @@
from asterisk import utils
from sipp.version import SIPpVersion
+
TESTS_CONFIG = "tests.yaml"
TEST_RESULTS = "asterisk-test-suite-report.xml"
+
class Dependency:
def __init__(self, dep):
@@ -53,6 +55,10 @@
self.version = SIPpVersion(version, feature)
if self.sipp_version >= self.version:
self.met = True
+ if self.version.tls and not self.sipp_version.tls:
+ self.met = False
+ if self.version.pcap and not self.sipp_version.pcap:
+ self.met = False
elif "custom" in dep:
self.name = dep["custom"]
@@ -112,6 +118,7 @@
return True
return False
+
class TestConfig:
def __init__(self, test_name, ast_version):
More information about the svn-commits
mailing list