added -quick options to skip long tests
This commit is contained in:
@@ -6,11 +6,13 @@ Test for cpu.py
|
|||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import pexpect
|
import pexpect
|
||||||
|
import sys
|
||||||
|
|
||||||
class testCPU( unittest.TestCase ):
|
class testCPU( unittest.TestCase ):
|
||||||
|
|
||||||
prompt = 'mininet>'
|
prompt = 'mininet>'
|
||||||
|
|
||||||
|
@unittest.skipIf( '-quick' in sys.argv, 'long test' )
|
||||||
def testCPU( self ):
|
def testCPU( self ):
|
||||||
"Verify that CPU utilization is monotonically decreasing for each scheduler"
|
"Verify that CPU utilization is monotonically decreasing for each scheduler"
|
||||||
p = pexpect.spawn( 'python -m mininet.examples.cpu' )
|
p = pexpect.spawn( 'python -m mininet.examples.cpu' )
|
||||||
|
|||||||
@@ -6,9 +6,11 @@ Test for limit.py
|
|||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import pexpect
|
import pexpect
|
||||||
|
import sys
|
||||||
|
|
||||||
class testLimit( unittest.TestCase ):
|
class testLimit( unittest.TestCase ):
|
||||||
|
|
||||||
|
@unittest.skipIf( '-quick' in sys.argv, 'long test' )
|
||||||
def testLimit( self ):
|
def testLimit( self ):
|
||||||
"Verify that CPU limits are within a 2% tolerance of limit for each scheduler"
|
"Verify that CPU limits are within a 2% tolerance of limit for each scheduler"
|
||||||
p = pexpect.spawn( 'python -m mininet.examples.limit' )
|
p = pexpect.spawn( 'python -m mininet.examples.limit' )
|
||||||
|
|||||||
@@ -6,9 +6,11 @@ Test for linearbandwidth.py
|
|||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import pexpect
|
import pexpect
|
||||||
|
import sys
|
||||||
|
|
||||||
class testLinearBandwidth( unittest.TestCase ):
|
class testLinearBandwidth( unittest.TestCase ):
|
||||||
|
|
||||||
|
@unittest.skipIf( '-quick' in sys.argv, 'long test' )
|
||||||
def testLinearBandwidth( self ):
|
def testLinearBandwidth( self ):
|
||||||
"Verify that bandwidth is monotonically decreasing as # of hops increases"
|
"Verify that bandwidth is monotonically decreasing as # of hops increases"
|
||||||
p = pexpect.spawn( 'python -m mininet.examples.linearbandwidth' )
|
p = pexpect.spawn( 'python -m mininet.examples.linearbandwidth' )
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ Test for simpleperf.py
|
|||||||
import unittest
|
import unittest
|
||||||
import pexpect
|
import pexpect
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
from mininet.log import setLogLevel
|
from mininet.log import setLogLevel
|
||||||
from mininet.net import Mininet
|
from mininet.net import Mininet
|
||||||
from mininet.node import CPULimitedHost
|
from mininet.node import CPULimitedHost
|
||||||
@@ -16,6 +17,7 @@ from mininet.examples.simpleperf import SingleSwitchTopo
|
|||||||
|
|
||||||
class testSimplePerf( unittest.TestCase ):
|
class testSimplePerf( unittest.TestCase ):
|
||||||
|
|
||||||
|
@unittest.skipIf( '-quick' in sys.argv, 'long test' )
|
||||||
def testE2E( self ):
|
def testE2E( self ):
|
||||||
"Run the example and verify ping and iperf results"
|
"Run the example and verify ping and iperf results"
|
||||||
p = pexpect.spawn( 'python -m mininet.examples.simpleperf' )
|
p = pexpect.spawn( 'python -m mininet.examples.simpleperf' )
|
||||||
|
|||||||
@@ -6,11 +6,13 @@ Test for tree1024.py
|
|||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import pexpect
|
import pexpect
|
||||||
|
import sys
|
||||||
|
|
||||||
class testTree1024( unittest.TestCase ):
|
class testTree1024( unittest.TestCase ):
|
||||||
|
|
||||||
prompt = 'mininet>'
|
prompt = 'mininet>'
|
||||||
|
|
||||||
|
@unittest.skipIf( '-quick' in sys.argv, 'long test' )
|
||||||
def testTree1024( self ):
|
def testTree1024( self ):
|
||||||
"Run the example and do a simple ping test from h1 to h1024"
|
"Run the example and do a simple ping test from h1 to h1024"
|
||||||
p = pexpect.spawn( 'python -m mininet.examples.tree1024' )
|
p = pexpect.spawn( 'python -m mininet.examples.tree1024' )
|
||||||
|
|||||||
@@ -6,11 +6,13 @@ Test for treeping64.py
|
|||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import pexpect
|
import pexpect
|
||||||
|
import sys
|
||||||
|
|
||||||
class testTreePing64( unittest.TestCase ):
|
class testTreePing64( unittest.TestCase ):
|
||||||
|
|
||||||
prompt = 'mininet>'
|
prompt = 'mininet>'
|
||||||
|
|
||||||
|
@unittest.skipIf( '-quick' in sys.argv, 'long test' )
|
||||||
def testTreePing64( self ):
|
def testTreePing64( self ):
|
||||||
"Run the example and verify ping results"
|
"Run the example and verify ping results"
|
||||||
p = pexpect.spawn( 'python -m mininet.examples.treeping64' )
|
p = pexpect.spawn( 'python -m mininet.examples.treeping64' )
|
||||||
|
|||||||
Reference in New Issue
Block a user