-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathMakefile
59 lines (46 loc) · 1.33 KB
/
Makefile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Convenience to run tests and coverage.
# This probably won't work on Windows.
FLAGS=
TESTS=`find datafeed -name test_[a-z]\*.py`
NONTESTS=`find datafeed -name [a-z]\*.py ! -name test_\*.py`
PORT=8082
ADDRESS=localhost
PYTHON=python -Wignore
test:
$(PYTHON) -m datafeed/tests/runtests $(FLAGS)
full_test:
for i in $(TESTS); \
do \
echo $$i; \
$(PYTHON) -m `dirname $$i`/`basename $$i .py` $(FLAGS); \
done
test_datastore:
$(PYTHON) -m datafeed/tests/test_datastore $(FLAGS)
test_imiguserver:
$(PYTHON) -m datafeed/tests/test_imiguserver $(FLAGS)
test_server:
$(PYTHON) -m datafeed/tests/test_server $(FLAGS)
test_client:
$(PYTHON) -m datafeed/tests/test_client $(FLAGS)
test_exchange:
$(PYTHON) -m datafeed/tests/test_exchange $(FLAGS)
test_s_google:
$(PYTHON) -m datafeed/providers/tests/test_google $(FLAGS)
c cov cove cover coverage:
python-coverage erase
for i in $(TESTS); \
do \
echo $$i; \
PYTHONPATH=. python-coverage run -p $$i; \
done
python-coverage combine
python-coverage html -d "`pwd`/htmlcov" $(NONTESTS)
python-coverage report -m $(NONTESTS)
echo "open file://`pwd`/htmlcov/index.html"
serve:
server.py --port $(PORT) --address $(ADDRESS)
debug:
server.py --port $(PORT) --address $(ADDRESS) --debug
clean:
rm -rf htmlcov
rm -f `find . -name \*.pyc -o -name \*~ -o -name @* -o -name \*.orig`