+PYTHON = python
SRCDIR = $(CURDIR)/src
TESTDIR = $(CURDIR)/test
TESTLIB = $(TESTDIR)/lib
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),)
else
test-one: all
echo $(file) $(case)
- PYTHONPATH="$(PYPATH)" $(file) $(case)
+ PYTHONPATH="$(PYPATH)" $(PYTHON) $(file) $(case)
endif
test-app:
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)
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)
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