Change run() to allow running external functions.
This commit is contained in:
+2
-2
@@ -375,11 +375,11 @@ class Mininet( object ):
|
|||||||
controller.stop()
|
controller.stop()
|
||||||
info( '*** Test complete\n' )
|
info( '*** Test complete\n' )
|
||||||
|
|
||||||
def run( self, test, **params ):
|
def run( self, test, *args, **kwargs ):
|
||||||
"Perform a complete start/test/stop cycle."
|
"Perform a complete start/test/stop cycle."
|
||||||
self.start()
|
self.start()
|
||||||
info( '*** Running test\n' )
|
info( '*** Running test\n' )
|
||||||
result = getattr( self, test )( **params )
|
result = test( *args, **kwargs )
|
||||||
self.stop()
|
self.stop()
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user