From c5da46f1255111a3c163f7bfa42dd5e4034526ce Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Tue, 10 Sep 2013 18:49:13 -0700 Subject: [PATCH] added -quick options to skip long tests --- examples/test/test_cpu.py | 2 ++ examples/test/test_limit.py | 2 ++ examples/test/test_linearbandwidth.py | 2 ++ examples/test/test_simpleperf.py | 2 ++ examples/test/test_tree1024.py | 2 ++ examples/test/test_treeping64.py | 2 ++ 6 files changed, 12 insertions(+) diff --git a/examples/test/test_cpu.py b/examples/test/test_cpu.py index dd35490..2547784 100755 --- a/examples/test/test_cpu.py +++ b/examples/test/test_cpu.py @@ -6,11 +6,13 @@ Test for cpu.py import unittest import pexpect +import sys class testCPU( unittest.TestCase ): prompt = 'mininet>' + @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testCPU( self ): "Verify that CPU utilization is monotonically decreasing for each scheduler" p = pexpect.spawn( 'python -m mininet.examples.cpu' ) diff --git a/examples/test/test_limit.py b/examples/test/test_limit.py index 99a8c25..db9eb33 100755 --- a/examples/test/test_limit.py +++ b/examples/test/test_limit.py @@ -6,9 +6,11 @@ Test for limit.py import unittest import pexpect +import sys class testLimit( unittest.TestCase ): + @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testLimit( self ): "Verify that CPU limits are within a 2% tolerance of limit for each scheduler" p = pexpect.spawn( 'python -m mininet.examples.limit' ) diff --git a/examples/test/test_linearbandwidth.py b/examples/test/test_linearbandwidth.py index b6c47fd..d3c1144 100755 --- a/examples/test/test_linearbandwidth.py +++ b/examples/test/test_linearbandwidth.py @@ -6,9 +6,11 @@ Test for linearbandwidth.py import unittest import pexpect +import sys class testLinearBandwidth( unittest.TestCase ): + @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testLinearBandwidth( self ): "Verify that bandwidth is monotonically decreasing as # of hops increases" p = pexpect.spawn( 'python -m mininet.examples.linearbandwidth' ) diff --git a/examples/test/test_simpleperf.py b/examples/test/test_simpleperf.py index 319ebc5..7d44c9c 100755 --- a/examples/test/test_simpleperf.py +++ b/examples/test/test_simpleperf.py @@ -7,6 +7,7 @@ Test for simpleperf.py import unittest import pexpect import re +import sys from mininet.log import setLogLevel from mininet.net import Mininet from mininet.node import CPULimitedHost @@ -16,6 +17,7 @@ from mininet.examples.simpleperf import SingleSwitchTopo class testSimplePerf( unittest.TestCase ): + @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testE2E( self ): "Run the example and verify ping and iperf results" p = pexpect.spawn( 'python -m mininet.examples.simpleperf' ) diff --git a/examples/test/test_tree1024.py b/examples/test/test_tree1024.py index 2d180cb..fbc82c5 100755 --- a/examples/test/test_tree1024.py +++ b/examples/test/test_tree1024.py @@ -6,11 +6,13 @@ Test for tree1024.py import unittest import pexpect +import sys class testTree1024( unittest.TestCase ): prompt = 'mininet>' + @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testTree1024( self ): "Run the example and do a simple ping test from h1 to h1024" p = pexpect.spawn( 'python -m mininet.examples.tree1024' ) diff --git a/examples/test/test_treeping64.py b/examples/test/test_treeping64.py index 8154314..ae02afc 100755 --- a/examples/test/test_treeping64.py +++ b/examples/test/test_treeping64.py @@ -6,11 +6,13 @@ Test for treeping64.py import unittest import pexpect +import sys class testTreePing64( unittest.TestCase ): prompt = 'mininet>' + @unittest.skipIf( '-quick' in sys.argv, 'long test' ) def testTreePing64( self ): "Run the example and verify ping results" p = pexpect.spawn( 'python -m mininet.examples.treeping64' )