forked from rfk/mentat-sync-prototype
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (27 loc) · 1.08 KB
/
Makefile
File metadata and controls
33 lines (27 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
VIRTUALENV = virtualenv
NOSE = local/bin/nosetests -s
TESTS = mentatsync/tests
PYTHON = local/bin/python
PIP = local/bin/pip
PIP_CACHE = /tmp/pip-cache.${USER}
BUILD_TMP = /tmp/mentatsync-build.${USER}
MOZSVC_SQLURI = sqlite:///:memory:
export MOZSVC_SQLURI
INSTALL = ARCHFLAGS=$(ARCHFLAGS) $(PIP) install -U
.PHONY: all build test
all: build
build:
$(VIRTUALENV) --no-site-packages --distribute ./local
$(INSTALL) --upgrade Distribute pip
$(INSTALL) -r requirements.txt
$(PYTHON) ./setup.py develop
test:
$(INSTALL) nose flake8
# Check that flake8 passes before bothering to run anything.
# This can really cut down time wasted by typos etc.
./local/bin/flake8 mentatsync
# Run the actual testcases.
$(NOSE) $(TESTS)
# Test that live functional tests can run correctly, by actually
# spinning up a server and running them against it.
./local/bin/gunicorn --paste ./mentatsync/tests/tests.ini --workers 1 --worker-class mozsvc.gunicorn_worker.MozSvcGeventWorker & SERVER_PID=$$! ; sleep 2 ; ./local/bin/python mentatsync/tests/functional/test_api.py http://localhost:5013 ; kill $$SERVER_PID