forked from thumbor/thumbor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (49 loc) · 2 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
60
61
62
63
64
65
66
run: compile_ext
@thumbor -l debug
setup:
@pip install -e .[tests]
@echo
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@echo ">>>>>>>>>>>>>>> MAKE SURE GIFSICLE IS INSTALLED IF RUNNING TESTS <<<<<<<<<<<<<<"
@echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
@echo
compile_ext:
@python setup.py build_ext -i
f ?= "vows/"
test pyvows: compile_ext redis mongo
@pyvows -vv --profile --cover --cover-package=thumbor --cover-threshold=90 $f
@nosetests -sv thumbor/integration_tests/
@$(MAKE) static
$(MAKE) kill_mongo kill_redis
ci_test: compile_ext
@echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
@echo "TORNADO IS `python -c 'import tornado; import inspect; print(inspect.getfile(tornado))'`"
@echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
@if [ -z "$$INTEGRATION_TEST" ]; then $(MAKE) pyvows_run; else $(MAKE) integration_run; fi
pyvows_run:
@pyvows -vvv --profile --cover --cover-package=thumbor --cover-threshold=90 vows/
integration_run:
@nosetests -sv thumbor/integration_tests/
mysql_test: pretest
PYTHONPATH=.:$$PYTHONPATH nosetests -v -s --with-coverage --cover-erase --cover-package=thumbor tests/test_mysql_storage.py
kill_mongo:
@ps aux | awk '(/mongod/ && $$0 !~ /awk/){ system("kill -9 "$$2) }'
mongo: kill_mongo
@rm -rf /tmp/thumbor/mongodata && mkdir -p /tmp/thumbor/mongodata
@mongod --dbpath /tmp/thumbor/mongodata --logpath /tmp/thumbor/mongolog --port 7777 --quiet --fork --smallfiles
@mongo --nodb mongo_check_start.js
kill_redis:
@-redis-cli -p 6668 -a hey_you shutdown
redis: kill_redis
@redis-server redis.conf ; sleep 1
@redis-cli -p 6668 -a hey_you info
flake:
@flake8 . --ignore=W801,E501
setup_docs:
pip install -r docs/requirements.txt
build_docs:
cd docs && make html
docs: setup_docs build_docs
python -mwebbrowser file:///`pwd`/docs/_build/html/index.html
static:
@flake8 --config=./flake8 .