Skip to content
Snippets Groups Projects
Commit 94324e3f authored by Bob Lantz's avatar Bob Lantz Committed by Brian O'Connor
Browse files

Skip IVS and UserSwitch tests if they are not installed

parent d2762938
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@
from mininet.link import TCLink
from mininet.topo import Topo
from mininet.log import setLogLevel
from mininet.util import quietRun
# Number of hosts for each test
N = 2
......@@ -125,10 +126,13 @@ class testOptionsTopoOVSKernel( testOptionsTopoCommon, unittest.TestCase ):
"Verify ability to create networks with host and link options (OVS kernel switch)."
switchClass = OVSKernelSwitch
@unittest.skipUnless( quietRun( 'which ivs-ctl' ), 'IVS is not installed' )
class testOptionsTopoIVS( testOptionsTopoCommon, unittest.TestCase ):
"Verify ability to create networks with host and link options (IVS switch)."
switchClass = IVSSwitch
@unittest.skipUnless( quietRun( 'which ofprotocol' ),
'Reference user switch is not installed' )
class testOptionsTopoUserspace( testOptionsTopoCommon, unittest.TestCase ):
"Verify ability to create networks with host and link options (Userspace switch)."
switchClass = UserSwitch
......
......@@ -10,6 +10,7 @@
from mininet.node import UserSwitch, OVSKernelSwitch, IVSSwitch
from mininet.topo import SingleSwitchTopo, LinearTopo
from mininet.log import setLogLevel
from mininet.util import quietRun
class testSingleSwitchCommon( object ):
......@@ -53,14 +54,18 @@ def testLinear5( self ):
dropped = mn.run( mn.ping )
self.assertEqual( dropped, 0 )
class testLinearOVSKernel( testLinearCommon, unittest.TestCase ):
"Test all-pairs ping with LinearNet (OVS kernel switch)."
switchClass = OVSKernelSwitch
@unittest.skipUnless( quietRun( 'which ivs-ctl' ), 'IVS is not installed' )
class testLinearIVS( testLinearCommon, unittest.TestCase ):
"Test all-pairs ping with LinearNet (IVS switch)."
switchClass = IVSSwitch
@unittest.skipUnless( quietRun( 'which ofprotocol' ),
'Reference user switch is not installed' )
class testLinearUserspace( testLinearCommon, unittest.TestCase ):
"Test all-pairs ping with LinearNet (Userspace switch)."
switchClass = UserSwitch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment