Skip to content
Snippets Groups Projects
Commit 5fc3f57e authored by lantz's avatar lantz
Browse files

Merge pull request #386 from cdburkard/patches/cpu_test

Skip test_cpu.py if RT_GROUP_SCHED is not enabled
parents 5789dae8 823d1b99
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,8 @@ class testCPU( unittest.TestCase ):
def testCPU( self ):
"Verify that CPU utilization is monotonically decreasing for each scheduler"
p = pexpect.spawn( 'python -m mininet.examples.cpu' )
opts = [ '([a-z]+)\t([\d\.]+)%\t([\d\.]+)', pexpect.EOF ]
opts = [ '([a-z]+)\t([\d\.]+)%\t([\d\.]+)',
'please enable RT_GROUP_SCHED', pexpect.EOF ]
scheds = []
while True:
index = p.expect( opts, timeout=600 )
......@@ -29,6 +30,8 @@ def testCPU( self ):
previous_bw = 10 ** 4 # 10 GB/s
self.assertTrue( bw < previous_bw )
previous_bw = bw
elif index == 1:
self.skipTest( 'please enable RT_GROUP_SCHED' )
else:
break
......
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