-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathMakefile
57 lines (43 loc) · 2.47 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
test: mongo-test unit
unit:
@coverage run --branch `which nosetests` -vv --rednose -s tests/
@echo
@coverage report -m --fail-under=80
@$(MAKE) doctest
doctest:
@cd docs && $(MAKE) doctest
ci_test: mongo-test test
tox:
@PATH=$$PATH:~/.pythonbrew/pythons/Python-2.6.*/bin/:~/.pythonbrew/pythons/Python-2.7.*/bin/:~/.pythonbrew/pythons/Python-3.0.*/bin/:~/.pythonbrew/pythons/Python-3.1.*/bin/:~/.pythonbrew/pythons/Python-3.2.3/bin/:~/.pythonbrew/pythons/Python-3.3.0/bin/ tox
tox3:
@PATH=$$PATH:~/.pythonbrew/pythons/Python-2.6.*/bin/:~/.pythonbrew/pythons/Python-2.7.*/bin/:~/.pythonbrew/pythons/Python-3.0.*/bin/:~/.pythonbrew/pythons/Python-3.1.*/bin/:~/.pythonbrew/pythons/Python-3.2.3/bin/:~/.pythonbrew/pythons/Python-3.3.0/bin/ tox -e py33
toxpypy:
@PATH=$$PATH:~/.pythonbrew/pythons/Python-2.6.*/bin/:~/.pythonbrew/pythons/Python-2.7.*/bin/:~/.pythonbrew/pythons/Python-3.0.*/bin/:~/.pythonbrew/pythons/Python-3.1.*/bin/:~/.pythonbrew/pythons/Python-3.2.3/bin/:~/.pythonbrew/pythons/Python-3.3.0/bin/ tox -e pypy
clean:
@rm -rf ./docs/build/
@rm -rf ./build
@find . -name '*.pyc' -delete
clean-doc:
@cd docs && make clean
doc:
@cd docs && make doctest && make html
open-doc:
@cd docs && open build/html/index.html
setup:
@pip install -e .\[tests\]
@-pip install ujson
kill-mongo-test:
@ps aux | awk '(/mongod.+test/ && $$0 !~ /awk/){ system("kill -9 "$$2) }'
@rm -rf /tmp/motorengine_test/mongodata
@rm -rf /tmp/motorengine_test_2/mongodata
@rm -rf /tmp/motorengine_test_3/mongodata
mongo-test: kill-mongo-test
@rm -rf /tmp/motorengine_test/mongotestdata && mkdir -p /tmp/motorengine_test/mongotestdata
@rm -rf /tmp/motorengine_test_2/mongotestdata && mkdir -p /tmp/motorengine_test_2/mongotestdata
@rm -rf /tmp/motorengine_test_3/mongotestdata && mkdir -p /tmp/motorengine_test_3/mongotestdata
@mongod --dbpath /tmp/motorengine_test/mongotestdata --logpath /tmp/motorengine_test/mongotestlog --port 4445 --quiet --smallfiles --oplogSize 128 &
@mongod --dbpath /tmp/motorengine_test_2/mongotestdata --logpath /tmp/motorengine_test_2/mongotestlog --replSet rs0 --port 27017 --quiet --smallfiles --oplogSize 128 &
@mongod --dbpath /tmp/motorengine_test_3/mongotestdata --logpath /tmp/motorengine_test_3/mongotestlog --replSet rs0 --port 27018 --quiet --smallfiles --oplogSize 128 &
@sleep 20
@mongo --host localhost --port 27017 --eval 'rs.initiate({_id: "rs0", members: [{ _id: 0, host: "localhost:27017" }]});rs.conf();while(!rs.add("localhost:27018")["ok"]){};quit()'
@sleep 20