Revision fc2a8fd5 mininet/test/test_walkthrough.py

View differences:

mininet/test/test_walkthrough.py
313 313
        p.sendline( 'exit' )
314 314
        p.wait()
315 315

  
316
    @unittest.skipUnless( '1 received' in quietRun( 'ping -c 1 github.com' ), 
316
    @unittest.skipUnless( os.path.exists( '/tmp/pox' ) or
317
                          '1 received' in quietRun( 'ping -c 1 github.com' ),
317 318
                          'Github is not reachable; cannot download Pox' )
318 319
    def testRemoteController( self ):
319 320
        "Test Mininet using Pox controller"
320
        p = pexpect.spawn( 'test ! -d /tmp/pox && git clone https://github.com/noxrepo/pox.git /tmp/pox')
321
        p.wait()
321
        if not os.path.exists( '/tmp/pox' ):
322
            p = pexpect.spawn( 'git clone https://github.com/noxrepo/pox.git /tmp/pox' )
323
            p.expect( pexpect.EOF )
322 324
        pox = pexpect.spawn( '/tmp/pox/pox.py forwarding.l2_learning' )
323 325
        net = pexpect.spawn( 'mn --controller=remote,ip=127.0.0.1,port=6633 --test pingall' )
324 326
        net.expect( '0% dropped' )

Also available in: Unified diff