diff --git a/mininet/test/test_hifi.py b/mininet/test/test_hifi.py index e881f3aa6c88570abacace6d6a2fb14e9a12185e..542e009958758969bbe54e913bfbab6a6384b7a3 100755 --- a/mininet/test/test_hifi.py +++ b/mininet/test/test_hifi.py @@ -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 diff --git a/mininet/test/test_nets.py b/mininet/test/test_nets.py index 027bdd493a1e8cfd9b3751c9c989ec971813300f..45fc3eb237c1060abf338478ddd52455d0a52a81 100755 --- a/mininet/test/test_nets.py +++ b/mininet/test/test_nets.py @@ -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