Merge pull request #15 from mozilla-services/cleanup
Miscellaneous cleanup
This commit is contained in:
commit
8e078475ed
60
Makefile
60
Makefile
@ -1,39 +1,39 @@
|
|||||||
SYSTEMPYTHON = `which python2 python | head -n 1`
|
SYSTEMPYTHON = `which python2 python | head -n 1`
|
||||||
VIRTUALENV = virtualenv --python=$(SYSTEMPYTHON)
|
VIRTUALENV = virtualenv --python=$(SYSTEMPYTHON)
|
||||||
PYTHON = local/bin/python
|
ENV = ./local
|
||||||
NOSE = local/bin/nosetests -s
|
TOOLS := $(addprefix $(ENV)/bin/,flake8 nosetests)
|
||||||
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
|
.PHONY: all
|
||||||
|
all: build
|
||||||
|
|
||||||
all: build test
|
.PHONY: build
|
||||||
|
build: | $(ENV)
|
||||||
|
$(ENV):
|
||||||
|
$(VIRTUALENV) --no-site-packages $(ENV)
|
||||||
|
$(ENV)/bin/pip install -r requirements.txt
|
||||||
|
$(ENV)/bin/python ./setup.py develop
|
||||||
|
|
||||||
build:
|
.PHONY: test
|
||||||
$(VIRTUALENV) --no-site-packages --distribute ./local
|
test: | $(TOOLS)
|
||||||
$(INSTALL) --upgrade Distribute
|
$(ENV)/bin/flake8 ./syncserver
|
||||||
$(INSTALL) pip
|
$(ENV)/bin/nosetests -s syncstorage.tests
|
||||||
$(INSTALL) nose
|
# Tokenserver tests currently broken due to incorrect file paths
|
||||||
$(INSTALL) flake8
|
# $(ENV)/bin/nosetests -s tokenserver.tests
|
||||||
$(INSTALL) -r requirements.txt
|
|
||||||
$(PYTHON) ./setup.py develop
|
# Test against a running server
|
||||||
|
$(ENV)/bin/pserve syncserver/tests.ini & SERVER_PID=$$!; \
|
||||||
|
sleep 2; \
|
||||||
|
$(ENV)/bin/python -m syncstorage.tests.functional.test_storage \
|
||||||
|
--use-token-server http://localhost:5000/token/1.0/sync/1.5; \
|
||||||
|
kill $$SERVER_PID
|
||||||
|
|
||||||
test:
|
$(TOOLS): | $(ENV)
|
||||||
# Basic syntax and sanity checks.
|
$(ENV)/bin/pip install nose flake8
|
||||||
$(FLAKE8) ./syncserver
|
|
||||||
# Testcases from syncstorage app
|
|
||||||
$(NOSE) syncstorage.tests
|
|
||||||
# Testcases from tokenserver app; broken due to incorrect file paths
|
|
||||||
#$(NOSE) tokenserver.tests
|
|
||||||
# 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:
|
.PHONY: serve
|
||||||
./local/bin/pserve ./syncserver.ini
|
serve: | $(ENV)
|
||||||
|
$(ENV)/bin/pserve ./syncserver.ini
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf ./local
|
rm -rf $(ENV)
|
||||||
|
|||||||
@ -4,27 +4,22 @@ Chameleon==2.14
|
|||||||
chardet==2.2.1
|
chardet==2.2.1
|
||||||
circus==0.10
|
circus==0.10
|
||||||
cornice==0.16.2
|
cornice==0.16.2
|
||||||
coverage==3.7.1
|
|
||||||
docutils==0.11
|
docutils==0.11
|
||||||
flake8==2.1.0
|
|
||||||
gevent==1.0
|
gevent==1.0
|
||||||
greenlet==0.4.1
|
greenlet==0.4.1
|
||||||
hawkauthlib==0.1.1
|
hawkauthlib==0.1.1
|
||||||
Jinja2==2.7.1
|
Jinja2==2.7.1
|
||||||
Mako==0.9.1
|
Mako==0.9.1
|
||||||
MarkupSafe==0.18
|
MarkupSafe==0.18
|
||||||
mccabe==0.2.1
|
|
||||||
metlog-py==0.10
|
metlog-py==0.10
|
||||||
ordereddict==1.1
|
ordereddict==1.1
|
||||||
Paste==1.7.5.1
|
Paste==1.7.5.1
|
||||||
PasteDeploy==1.5.2
|
PasteDeploy==1.5.2
|
||||||
PasteScript==1.7.5
|
PasteScript==1.7.5
|
||||||
pep8==1.4.6
|
|
||||||
powerhose==0.7
|
powerhose==0.7
|
||||||
protobuf==2.5
|
protobuf==2.5
|
||||||
psutil==1.2.1
|
psutil==1.2.1
|
||||||
PyBrowserID==0.9.1
|
PyBrowserID==0.9.1
|
||||||
pyflakes==0.7.3
|
|
||||||
Pygments==1.6
|
Pygments==1.6
|
||||||
PyMySQL==0.6.1
|
PyMySQL==0.6.1
|
||||||
pymysql_sa==1.0
|
pymysql_sa==1.0
|
||||||
|
|||||||
@ -62,8 +62,7 @@ def includeme(config):
|
|||||||
settings["browserid.backend"] = "tokenserver.verifiers.RemoteVerifier"
|
settings["browserid.backend"] = "tokenserver.verifiers.RemoteVerifier"
|
||||||
settings["browserid.audiences"] = public_url
|
settings["browserid.audiences"] = public_url
|
||||||
if "metlog.backend" not in settings:
|
if "metlog.backend" not in settings:
|
||||||
# Default to capturing metlog output in memory.
|
# Default to sending metlog output to stdout.
|
||||||
# In other words, stop of from being so damn chatty on stdout.
|
|
||||||
settings["metlog.backend"] = "mozsvc.metrics.MetlogPlugin"
|
settings["metlog.backend"] = "mozsvc.metrics.MetlogPlugin"
|
||||||
settings["metlog.sender_class"] = "metlog.senders.StdOutSender"
|
settings["metlog.sender_class"] = "metlog.senders.StdOutSender"
|
||||||
settings["metlog.enabled"] = True
|
settings["metlog.enabled"] = True
|
||||||
|
|||||||
@ -15,3 +15,9 @@ public_url = http://localhost:5000/
|
|||||||
|
|
||||||
# This is a secret key used for signing authentication tokens.
|
# This is a secret key used for signing authentication tokens.
|
||||||
#secret = INSERT_SECRET_KEY_HERE
|
#secret = INSERT_SECRET_KEY_HERE
|
||||||
|
|
||||||
|
# Enable metlog during tests, but do not log normal traffic to stdout.
|
||||||
|
[metlog]
|
||||||
|
backend = "mozsvc.metrics.MetlogPlugin"
|
||||||
|
sender_class = "metlog.senders.DebugCaptureSender"
|
||||||
|
enabled = True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user