Allow -b to specify install or test branch
This commit is contained in:
+12
-5
@@ -510,8 +510,13 @@ def walkthroughTest( vm, prompt=Prompt ):
|
|||||||
|
|
||||||
|
|
||||||
def checkOutBranch( vm, branch, prompt=Prompt ):
|
def checkOutBranch( vm, branch, prompt=Prompt ):
|
||||||
vm.sendline( 'cd ~/mininet; git fetch; git pull --rebase; git checkout '
|
# This is a bit subtle; it will check out an existing branch (e.g. master)
|
||||||
+ branch )
|
# if it exists; otherwise it will create a detached branch.
|
||||||
|
# The branch will be rebased to its parent on origin.
|
||||||
|
# This probably doesn't matter since we're running on a COW disk
|
||||||
|
# anyway.
|
||||||
|
vm.sendline( 'cd ~/mininet; git fetch --all; git checkout '
|
||||||
|
+ branch + '; git pull --rebase origin ' + branch )
|
||||||
vm.expect( prompt )
|
vm.expect( prompt )
|
||||||
vm.sendline( 'sudo make install' )
|
vm.sendline( 'sudo make install' )
|
||||||
|
|
||||||
@@ -531,7 +536,10 @@ def interact( vm, tests, pre='', post='', prompt=Prompt ):
|
|||||||
'install-mininet-vm.sh' )
|
'install-mininet-vm.sh' )
|
||||||
vm.expect( prompt )
|
vm.expect( prompt )
|
||||||
log( '* Running VM install script' )
|
log( '* Running VM install script' )
|
||||||
vm.sendline( 'bash install-mininet-vm.sh' )
|
installcmd = 'bash install-mininet-vm.sh'
|
||||||
|
if Branch:
|
||||||
|
cmd = cmd + ' ' + Branch
|
||||||
|
vm.sendline( installcmd )
|
||||||
vm.expect ( 'password for mininet: ' )
|
vm.expect ( 'password for mininet: ' )
|
||||||
vm.sendline( 'mininet' )
|
vm.sendline( 'mininet' )
|
||||||
log( '* Waiting for script to complete... ' )
|
log( '* Waiting for script to complete... ' )
|
||||||
@@ -867,8 +875,7 @@ def parseArgs():
|
|||||||
parser.add_argument( '-p', '--post', metavar='cmd', default='',
|
parser.add_argument( '-p', '--post', metavar='cmd', default='',
|
||||||
help='specify a command line to run after tests' )
|
help='specify a command line to run after tests' )
|
||||||
parser.add_argument( '-b', '--branch', metavar='branch',
|
parser.add_argument( '-b', '--branch', metavar='branch',
|
||||||
help='For an existing VM image, check out and install'
|
help='branch to install and/or check out and test' )
|
||||||
' this branch before testing' )
|
|
||||||
parser.add_argument( 'flavor', nargs='*',
|
parser.add_argument( 'flavor', nargs='*',
|
||||||
help='VM flavor(s) to build (e.g. raring32server)' )
|
help='VM flavor(s) to build (e.g. raring32server)' )
|
||||||
parser.add_argument( '-z', '--zip', action='store_true',
|
parser.add_argument( '-z', '--zip', action='store_true',
|
||||||
|
|||||||
Reference in New Issue
Block a user