From 2ff5b287769a5772968642c7b145062856e06f0f Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 15 Oct 2015 20:58:25 +0200 Subject: [PATCH] still rubbing off differences --- Makefile | 9 +++++---- examples/linux/testing/ccncat_extended_ring_topo.py | 2 +- examples/linux/testing/scalability.py | 2 +- examples/openvswitch/ovs_ping_3_switches.py | 2 ++ 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index c9deb28d..1d47ef48 100644 --- 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: diff --git a/examples/linux/testing/ccncat_extended_ring_topo.py b/examples/linux/testing/ccncat_extended_ring_topo.py index 27932e24..2e5cce81 100644 --- a/examples/linux/testing/ccncat_extended_ring_topo.py +++ b/examples/linux/testing/ccncat_extended_ring_topo.py @@ -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) diff --git a/examples/linux/testing/scalability.py b/examples/linux/testing/scalability.py index 4c896c27..1c9033b6 100644 --- a/examples/linux/testing/scalability.py +++ b/examples/linux/testing/scalability.py @@ -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) diff --git a/examples/openvswitch/ovs_ping_3_switches.py b/examples/openvswitch/ovs_ping_3_switches.py index 25e9b7f7..1562d709 100644 --- a/examples/openvswitch/ovs_ping_3_switches.py +++ b/examples/openvswitch/ovs_ping_3_switches.py @@ -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 -- 2.43.0