Skip to content
Snippets Groups Projects
Commit 629e58ca authored by Bob Lantz's avatar Bob Lantz
Browse files

Add 'use' test for using VM interactively

parent d6da13d4
No related branches found
No related tags found
No related merge requests found
...@@ -554,6 +554,20 @@ def walkthroughTest( vm, prompt=Prompt ): ...@@ -554,6 +554,20 @@ def walkthroughTest( vm, prompt=Prompt ):
vm.sendline( 'sudo python ~/mininet/mininet/test/test_walkthrough.py -v' ) vm.sendline( 'sudo python ~/mininet/mininet/test/test_walkthrough.py -v' )
def useTest( vm, prompt=Prompt ):
"Use VM interactively - exit by pressing control-]"
old = vm.logfile
if old == stdout:
# Avoid doubling every output character!
log( '* Temporarily disabling logging to stdout' )
vm.logfile = None
log( '* Switching to interactive use - press control-] to exit' )
vm.interact()
if old == stdout:
log( '* Restoring logging to stdout' )
vm.logfile = stdout
def checkOutBranch( vm, branch, prompt=Prompt ): def checkOutBranch( vm, branch, prompt=Prompt ):
# This is a bit subtle; it will check out an existing branch (e.g. master) # This is a bit subtle; it will check out an existing branch (e.g. master)
# if it exists; otherwise it will create a detached branch. # if it exists; otherwise it will create a detached branch.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment