-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
87 lines (72 loc) · 1.88 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
.PHONY: all test console compile
all: test
TESTSPEC ?= default.spec
PRESET ?= all
PREPARE ?= prepare
test_clean: get-deps
rm -rf tests/*.beam
make test
cover_test_clean: get-deps
rm -rf tests/*.beam
make cover_test
quicktest: $(PREPARE)
erl -noinput -sname test -setcookie ejabberd \
-pa `pwd`/tests \
`pwd`/ebin \
`pwd`/deps/*/ebin \
$(ADD_OPTS) \
-s run_common_test main test=quick spec=$(TESTSPEC)
cover_quicktest: $(PREPARE)
erl -noinput -sname test -setcookie ejabberd \
-pa `pwd`/tests \
`pwd`/ebin \
`pwd`/deps/*/ebin \
$(ADD_OPTS) \
-s run_common_test main test=quick spec=$(TESTSPEC) cover=true
test_preset: $(PREPARE)
erl -noinput -sname test -setcookie ejabberd \
-pa `pwd`/tests \
`pwd`/ebin \
`pwd`/deps/*/ebin \
$(ADD_OPTS) \
-s run_common_test main test=full spec=$(TESTSPEC) preset=$(PRESET)
cover_test_preset: $(PREPARE)
erl -noinput -sname test -setcookie ejabberd \
-pa `pwd`/tests \
`pwd`/ebin \
`pwd`/deps/*/ebin \
$(ADD_OPTS) \
-s run_common_test main test=full spec=$(TESTSPEC) preset=$(PRESET) cover=true
test: $(PREPARE)
erl -noinput -sname test -setcookie ejabberd \
-pa `pwd`/tests \
`pwd`/ebin \
`pwd`/deps/*/ebin \
$(ADD_OPTS) \
-s run_common_test main test=full spec=$(TESTSPEC)
cover_test: $(PREPARE)
erl -noinput -sname test -setcookie ejabberd \
-pa `pwd`/tests \
`pwd`/ebin \
`pwd`/deps/*/ebin \
$(ADD_OPTS) \
-s run_common_test main test=full spec=$(TESTSPEC) cover=true
prepare: compile
erlc -Ideps/exml/include \
run_common_test.erl
mkdir -p ct_report
console: compile
erl -sname test -setcookie ejabberd \
-pa `pwd`/tests \
`pwd`/ebin \
`pwd`/deps/*/ebin \
compile: get-deps
./rebar compile
get-deps: rebar
./rebar get-deps
clean: rebar
rm -rf tests/*.beam
./rebar clean
rebar:
wget http://cloud.github.com/downloads/basho/rebar/rebar
chmod u+x rebar