Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Commit 21076bd

Browse files
author
Joshua Reich
committed
updated to work w/ mininet 2.2.0
1 parent 3803c77 commit 21076bd

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

mininet.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
#!/bin/bash
22

3-
sudo ~/pyretic/mininet/mn -c
4-
sudo ~/pyretic/mininet/mn --custom $HOME/pyretic/mininet/extra-topos.py --controller remote --mac $@
3+
VER=`mn --version`
4+
5+
if [[ "$VER" < "2.2.0" ]]
6+
then
7+
MN="$HOME/pyretic/mininet/mn"
8+
else
9+
MN=mn
10+
fi
11+
sudo $MN -c
12+
sudo $MN --custom $HOME/pyretic/mininet/extra-topos.py --controller remote --mac $@

pyretic/tests/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ def _start_controller(self):
5252
self.out = file(out_path, 'w')
5353
self.err = file(err_path, 'w')
5454
self.process = subprocess.Popen(cmd, stdout=self.out, stderr=self.err)
55-
time.sleep(2)
55+
#time.sleep(2)
5656
return [out_name, err_name]
5757

5858
def _stop_controller(self):
5959
self.process.send_signal(signal.SIGINT)
6060
self.out.close()
6161
self.err.close()
62-
time.sleep(2)
62+
#time.sleep(2)
6363

6464
def _run_mininet(self):
6565
cmd = shlex.split('sudo %s' % self.test_file)

0 commit comments

Comments
 (0)