From 61c144b9f6c67d9f9e20cf4c6d5daa992bc092e9 Mon Sep 17 00:00:00 2001 From: Bob Lantz <rlantz@cs.stanford.edu> Date: Tue, 7 Oct 2014 16:08:57 -0700 Subject: [PATCH] Minor fixes to wireshark test --- mininet/test/test_walkthrough.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/mininet/test/test_walkthrough.py b/mininet/test/test_walkthrough.py index 6793252a..802e14ac 100755 --- a/mininet/test/test_walkthrough.py +++ b/mininet/test/test_walkthrough.py @@ -26,13 +26,10 @@ def testHelp( self ): def testWireshark( self ): "Use tshark to test the of dissector" tshark = pexpect.spawn( 'tshark -i lo -R of' ) - if ubuntuVersion() == '12.04': - tshark.expect( 'Capturing on lo' ) - else: - tshark.expect( "Capturing on 'Loopback'" ) + tshark.expect( [ 'Capturing on lo', "Capturing on 'Loopback'" ] ) mn = pexpect.spawn( 'mn --test pingall' ) mn.expect( '0% dropped' ) - tshark.expect( 'OFP 74 Hello' ) + tshark.expect( [ '74 Hello', '74 of_hello' ] ) tshark.sendintr() def testBasic( self ): @@ -68,7 +65,7 @@ def testBasic( self ): node = p.match.group( 1 ) actual.append( node ) p.expect( '\n' ) - self.assertEqual( actual.sort(), nodes.sort(), '"nodes" and "dump" differ' ) + self.assertEqual( actual.sort(), nodes.sort(), '"nodes" and "dump" differ' ) p.expect( self.prompt ) p.sendline( 'exit' ) p.wait() @@ -331,11 +328,6 @@ def testRemoteController( self ): pox.sendintr() pox.wait() -def ubuntuVersion(): - releaseStr = quietRun( 'cat /etc/lsb-release' ) - versionStr = re.findall( 'DISTRIB_RELEASE=\d+.\d+', releaseStr )[ 0 ] - version = versionStr.split( '=' )[ 1 ] - return version if __name__ == '__main__': unittest.main() -- GitLab