still rubbing off differences
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 15 Oct 2015 18:58:25 +0000 (20:58 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Thu, 15 Oct 2015 18:58:25 +0000 (20:58 +0200)
Makefile
examples/linux/testing/ccncat_extended_ring_topo.py
examples/linux/testing/scalability.py
examples/openvswitch/ovs_ping_3_switches.py

index c9deb28..1d47ef4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+PYTHON     = python
 SRCDIR      = $(CURDIR)/src
 TESTDIR     = $(CURDIR)/test
 TESTLIB     = $(TESTDIR)/lib
@@ -9,16 +10,16 @@ COVERAGE = $(or $(shell which coverage), $(shell which python-coverage), \
           coverage)
 
 all: clean
-       PYTHONPATH="$(PYTHONPATH):$(SRCDIR)" ./setup.py build
+       PYTHONPATH="$(PYTHONPATH):$(SRCDIR)" $(PYTHON) ./setup.py build
 
 install: all
-       PYTHONPATH="$(PYTHONPATH):$(SRCDIR)" ./setup.py install
+       PYTHONPATH="$(PYTHONPATH):$(SRCDIR)" $(PYTHON) ./setup.py install
 
 test: all
        retval=0; \
               for i in `find "$(TESTDIR)" -iname '*.py' -perm -u+x -type f`; do \
               echo $$i; \
-              PYTHONPATH="$(PYPATH)" $$i -v || retval=$$?; \
+              PYTHONPATH="$(PYPATH)" $(PYTHON) $$i -v || retval=$$?; \
               done; exit $$retval
 
 ifeq ($(file),)
@@ -27,7 +28,7 @@ test-one:
 else
 test-one: all
        echo $(file) $(case)
-       PYTHONPATH="$(PYPATH)" $(file) $(case)
+       PYTHONPATH="$(PYPATH)" $(PYTHON) $(file) $(case)
 endif
 
 test-app:
index 27932e2..2e5cce8 100644 (file)
@@ -156,7 +156,7 @@ if __name__ == '__main__':
     ring_hosts = [host1, host2, host3, host4]
     ccnds = dict()
 
-    for i in xrange(len(ring_hosts)):
+    for i in range(len(ring_hosts)):
         host = ring_hosts[i]
         node = add_node(ec, host, pl_user, pl_ssh_key)
         ccnd = add_ccnd(ec, node)
index 4c896c2..1c9033b 100644 (file)
@@ -148,7 +148,7 @@ if __name__ == '__main__':
 
     for host in hostnames:
         node = add_node(ec, host, pl_slice)
-        for i in xrange(20):
+        for i in range(20):
             app = add_app(ec)
             ec.register_connection(app, node)
             apps.append(app)
index 25e9b7f..1562d70 100644 (file)
@@ -236,6 +236,8 @@ for r1, (n1, ip1) in r2ip.items():
 
 ec.deploy()
 
+# py3: no need to transform into a list
+# as wait_finished (wait in fact) will do it anyway
 ec.wait_finished(apps.values())
 
 # collect results