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
|
||||
# Install pip
|
||||
$install ${PYPKG}-pip || $install ${PYPKG}-pip-whl
|
||||
if ! ${PYTHON} -m pip; then
|
||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||
if ! ${PYTHON} -m pip -V; then
|
||||
wget https://bootstrap.pypa.io/get-pip.py
|
||||
sudo ${PYTHON} get-pip.py
|
||||
rm get-pip.py
|
||||
fi
|
||||
|
||||
+6
-1
@@ -638,7 +638,8 @@ def checkOutBranch( vm, branch, prompt=Prompt ):
|
||||
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"
|
||||
login( vm )
|
||||
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/' "
|
||||
"/etc/default/grub; sudo update-grub" )
|
||||
vm.expect( prompt )
|
||||
if clean:
|
||||
log( '* Cleaning vm' )
|
||||
vm.sendline( '~/mininet/util/install.sh -d' )
|
||||
vm.expect( prompt )
|
||||
log( '* Shutting down' )
|
||||
vm.sendline( 'sync; sudo shutdown -h now' )
|
||||
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
|
||||
fi
|
||||
# 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
|
||||
# Optionally check out branch
|
||||
if [ "$1" != "" ]; then
|
||||
@@ -33,8 +33,14 @@ if [ "$1" != "" ]; then
|
||||
git checkout $1
|
||||
popd
|
||||
fi
|
||||
# Install Mininet
|
||||
time mininet/util/install.sh
|
||||
# Install Mininet for Python2 and Python3
|
||||
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
|
||||
time mininet/util/install.sh -tcd
|
||||
# Ignoring this since NOX classic is deprecated
|
||||
|
||||
Reference in New Issue
Block a user