Try to install python2 and python3 mininet (#1008)
This commit is contained in:
+2
-2
@@ -183,8 +183,8 @@ function mn_deps {
|
|||||||
${PYPKG}-pexpect ${PYPKG}-tk
|
${PYPKG}-pexpect ${PYPKG}-tk
|
||||||
# Install pip
|
# Install pip
|
||||||
$install ${PYPKG}-pip || $install ${PYPKG}-pip-whl
|
$install ${PYPKG}-pip || $install ${PYPKG}-pip-whl
|
||||||
if ! ${PYTHON} -m pip; then
|
if ! ${PYTHON} -m pip -V; then
|
||||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
wget https://bootstrap.pypa.io/get-pip.py
|
||||||
sudo ${PYTHON} get-pip.py
|
sudo ${PYTHON} get-pip.py
|
||||||
rm get-pip.py
|
rm get-pip.py
|
||||||
fi
|
fi
|
||||||
|
|||||||
+6
-1
@@ -638,7 +638,8 @@ def checkOutBranch( vm, branch, prompt=Prompt ):
|
|||||||
vm.sendline( 'util/install.sh -n' )
|
vm.sendline( 'util/install.sh -n' )
|
||||||
|
|
||||||
|
|
||||||
def interact( vm, tests, pre='', post='', prompt=Prompt ):
|
def interact( vm, tests, pre='', post='', prompt=Prompt,
|
||||||
|
clean=True):
|
||||||
"Interact with vm, which is a pexpect object"
|
"Interact with vm, which is a pexpect object"
|
||||||
login( vm )
|
login( vm )
|
||||||
log( '* Waiting for login...' )
|
log( '* Waiting for login...' )
|
||||||
@@ -677,6 +678,10 @@ def interact( vm, tests, pre='', post='', prompt=Prompt ):
|
|||||||
vm.sendline( "sudo sed -i -e 's/^GRUB_TERMINAL=serial/#GRUB_TERMINAL=serial/' "
|
vm.sendline( "sudo sed -i -e 's/^GRUB_TERMINAL=serial/#GRUB_TERMINAL=serial/' "
|
||||||
"/etc/default/grub; sudo update-grub" )
|
"/etc/default/grub; sudo update-grub" )
|
||||||
vm.expect( prompt )
|
vm.expect( prompt )
|
||||||
|
if clean:
|
||||||
|
log( '* Cleaning vm' )
|
||||||
|
vm.sendline( '~/mininet/util/install.sh -d' )
|
||||||
|
vm.expect( prompt )
|
||||||
log( '* Shutting down' )
|
log( '* Shutting down' )
|
||||||
vm.sendline( 'sync; sudo shutdown -h now' )
|
vm.sendline( 'sync; sudo shutdown -h now' )
|
||||||
log( '* Waiting for EOF/shutdown' )
|
log( '* Waiting for EOF/shutdown' )
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ if [ -e /etc/rc.local.backup ]; then
|
|||||||
sudo mv /etc/rc.local.backup /etc/rc.local
|
sudo mv /etc/rc.local.backup /etc/rc.local
|
||||||
fi
|
fi
|
||||||
# Fetch Mininet
|
# Fetch Mininet
|
||||||
sudo apt-get -y install git-core openssh-server
|
sudo apt-get -y -qq install git-core openssh-server
|
||||||
git clone git://github.com/mininet/mininet
|
git clone git://github.com/mininet/mininet
|
||||||
# Optionally check out branch
|
# Optionally check out branch
|
||||||
if [ "$1" != "" ]; then
|
if [ "$1" != "" ]; then
|
||||||
@@ -33,8 +33,14 @@ if [ "$1" != "" ]; then
|
|||||||
git checkout $1
|
git checkout $1
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
# Install Mininet
|
# Install Mininet for Python2 and Python3
|
||||||
time mininet/util/install.sh
|
APT="sudo apt-get -y -qq"
|
||||||
|
$APT install python3
|
||||||
|
$APT install python-is-python3 || true
|
||||||
|
$APT install python2 || $APT install python
|
||||||
|
python --version
|
||||||
|
time PYTHON=python3 mininet/util/install.sh
|
||||||
|
time PYTHON=python2 mininet/util/install.sh -n
|
||||||
# Finalize VM
|
# Finalize VM
|
||||||
time mininet/util/install.sh -tcd
|
time mininet/util/install.sh -tcd
|
||||||
# Ignoring this since NOX classic is deprecated
|
# Ignoring this since NOX classic is deprecated
|
||||||
|
|||||||
Reference in New Issue
Block a user