From 823d1b9990b52f0364bc4cf46d6f98bd9fc23788 Mon Sep 17 00:00:00 2001 From: cody burkard <cody@onlab.us> Date: Thu, 25 Sep 2014 10:16:55 -0700 Subject: [PATCH] skip test if RT_GROUP_SCHED is not enabled --- examples/test/test_cpu.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/test/test_cpu.py b/examples/test/test_cpu.py index 2547784e..8b529258 100755 --- a/examples/test/test_cpu.py +++ b/examples/test/test_cpu.py @@ -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 -- GitLab