2014-02-06 06:29:34 +00:00
|
|
|
VIRTUALENV = virtualenv
|
|
|
|
PYTHON = local/bin/python
|
|
|
|
NOSE = local/bin/nosetests -s
|
|
|
|
FLAKE8 = local/bin/flake8
|
|
|
|
PIP = local/bin/pip
|
|
|
|
PIP_CACHE = /tmp/pip-cache.${USER}
|
|
|
|
BUILD_TMP = /tmp/syncstorage-build.${USER}
|
|
|
|
PYPI = https://pypi.python.org/simple
|
|
|
|
INSTALL = $(PIP) install -U -i $(PYPI)
|
|
|
|
|
|
|
|
.PHONY: all build test serve clean
|
|
|
|
|
|
|
|
all: build test
|
|
|
|
|
|
|
|
build:
|
|
|
|
$(VIRTUALENV) --no-site-packages --distribute ./local
|
|
|
|
$(INSTALL) --upgrade Distribute
|
|
|
|
$(INSTALL) pip
|
|
|
|
$(INSTALL) nose
|
|
|
|
$(INSTALL) flake8
|
|
|
|
$(INSTALL) -r requirements.txt
|
|
|
|
$(PYTHON) ./setup.py develop
|
|
|
|
|
|
|
|
test:
|
|
|
|
# Basic syntax and sanity checks.
|
|
|
|
$(FLAKE8) ./syncserver
|
2014-02-11 08:58:49 +00:00
|
|
|
# Testcases from syncstorage app
|
2014-02-06 06:29:34 +00:00
|
|
|
$(NOSE) syncstorage.tests
|
2014-02-11 08:58:49 +00:00
|
|
|
# Testcases from tokenserver app; broken due to incorrect file paths
|
|
|
|
#$(NOSE) tokenserver.tests
|
2014-02-06 06:29:34 +00:00
|
|
|
# Live tests against a running server.
|
|
|
|
./local/bin/pserve syncserver/tests.ini & SERVER_PID=$$! ; sleep 2 ; ./local/bin/python -m syncstorage.tests.functional.test_storage --use-token-server http://localhost:5000/token/1.0/sync/1.5 ; kill $$SERVER_PID
|
|
|
|
|
|
|
|
serve:
|
|
|
|
./local/bin/pserve ./syncserver.ini
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf ./local
|